Commit Graph

35597 Commits (db37648cd6ce9b828abd6d49aa3d269926ee7b7d)

Author SHA1 Message Date
Sam Ravnborg 7b5b820381 kbuild: create output directory for hostprogs with O=.. build
hostprogs-y only supported creating output directory for the final
program. Extend this to also cover the situation where a .o
file (used when host program is made from compositie objects) is
locate in another directory.
First user of this is the built-in lxdialog that.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-25 09:04:42 +02:00
Sam Ravnborg 93659af1ce kbuild: add missing return statement in modpost.c:secref_whitelist()
Noticed by: Magnus Damm <magnus@valinux.co.jp>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-25 09:01:49 +02:00
Sam Ravnborg 4635281c8e kbuild: preperly align SYSMAP output
Align filenames for SYSMAP with other filenames

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-25 09:01:49 +02:00
Sam Ravnborg b805aa0e79 kbuild: make -rR is now default
Do not specify -rR anymore - it is default.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-25 09:01:49 +02:00
Sam Ravnborg 45d506bd65 kbuild: make V=2 tell why a target is rebuild
tell why a a target got build
   enabled by make V=2
      Output (listed in the order they are checked):
         (1) - due to target is PHONY
         (2) - due to target missing
         (3) - due to: file1.h file2.h
         (4) - due to command line change
         (5) - due to missing .cmd file
         (6) - due to target not in $(targets)
(1) We always build PHONY targets
(2) No target, so we better build it
(3) Prerequisite is newer than target
(4) The command line stored in the file named dir/.target.cmd
    differed from actual command line. This happens when compiler
    options changes
(5) No dir/.target.cmd file (used to store command line)
(6) No dir/.target.cmd file and target not listed in $(targets)
    This is a good hint that there is a bug in the kbuild file

This patch is inspired by a patch from: Milton Miller <miltonm@bga.com>

Cc: Milton Miller <miltonm@bga.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-25 09:01:49 +02:00
Sam Ravnborg 12715d20af kbuild: modpost on vmlinux regardless of CONFIG_MODULES
Based on patch from: Magnus Damm <magnus@valinux.co.jp>
This has the advantage that all section mismatch checks are run regardless
of modules being enabled or not.

When running modpost on vmlinux output:
MODPOST vmlinux

When running modpost on modules output count of modules like this:
MODPOST 5 modules

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-25 09:01:49 +02:00
Magnus Damm 9e157a5aa8 kbuild: ignore references from ".pci_fixup" to ".init.text"
The modpost code is extended to ignore references
from ".pci_fixup" to ".init.text".

Signed-off-by: Magnus Damm <magnus@valinux.co.jp>
2006-09-25 09:01:49 +02:00
Jan Engelhardt a07f6033ca kbuild: linguistic fixes for Documentation/kbuild/makefiles.txt
I have done a look-through through Documentation/kbuild/ and my corrections
(proposed) are attached.

Cc'ed are original author Michael (responsible for comitting changes to
these files?), Sam (kbuild maintainer), Adrian (-trivial maintainer).

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-25 09:00:01 +02:00
Jan Engelhardt d9a7ff6646 kbuild: linguistic fixes for Documentation/kbuild/modules.txt
I have done a look-through through Documentation/kbuild/ and my corrections
(proposed) are attached.

Cc'ed are original author Michael (responsible for comitting changes to
these files?), Sam (kbuild maintainer), Adrian (-trivial maintainer).

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-25 09:00:01 +02:00
Jan Engelhardt 83dcde4e1b kconfig: linguistic fixes for Documentation/kbuild/kconfig-language.txt
I have done a look-through through Documentation/kbuild/ and my corrections
(proposed) are attached.

Cc'ed are original author Michael (responsible for comitting changes to
these files?), Sam (kbuild maintainer), Adrian (-trivial maintainer).

Signed-off-by: Jan Engelhardt <jengelh@gmx.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-25 09:00:01 +02:00
Olaf Hering 65ff22ee3b remove RPM_BUILD_ROOT from asm-offsets.h
No file in rpm binary package should have the RPM_BUILD_ROOT string in it.
To simplify building of external modules, our kernel-source package
contains some temp files from the Kbuild system.  asm/asm-offsets.h is one
of the files that contains the absolute path if make O=$O is used.

  * This file was generated by /var/tmp/kernel-source-2.6.14_rc4-build/usr/src/linux-2.6.14-rc4-2/Kbuild

Remove the $RPM_BUILD_ROOT string in the shipped tempfile.

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-25 09:00:01 +02:00
Sam Ravnborg 07aea3a71f kbuild: use in-kernel unifdef
Let headers_install use in-kernel unifdef

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-25 09:00:01 +02:00
Sam Ravnborg 14a036d2dc kbuild: replace use of strlcpy with a dedicated implmentation in unifdef
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-25 09:00:00 +02:00
Sam Ravnborg 01f1c8799a kbuild: add unifdef
This patch contains a raw copy of unifdef.c
Next patch will modify it and add infrastructure to use it
Adding unifdef to the kernel is acked by the author.

The reason to add unifdef as part of the kernel source is that it is not
yet a common utility on most distributions.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-25 09:00:00 +02:00
Sam Ravnborg 48f1f0589d kbuild: consistently decide when to rebuild a target
Consistently decide when to rebuild a target across all of
if_changed, if_changed_dep, if_changed_rule.
PHONY targets are now treated alike (ignored) for all targets

While add it make Kbuild.include almost readable by factoring out a few
bits to some common variables and reuse this in Makefile.build.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-25 09:00:00 +02:00
Matthew Wilcox d3660a8cbd kconfig: support DOS line endings
Kconfig doesn't currently handle config files with DOS line endings.
While these are, of course, an abomination, etc, etc, it can be handy
to not have to convert them first.  It's also a tiny patch and even adds
support for lines ending in just \r or even \n\r.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2006-09-25 09:00:00 +02:00
David Woodhouse 6d71627581 New 'make headers_install_all' target.
Install headers for _all_ architectures, suitable for making a tarball
release or extracting them for use in a separate package.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-09-24 22:16:03 +01:00
David Woodhouse de78912582 Use dependencies for 'make headers_install'.
Re-export header files only if either they or their controlling Kbuild
file has actually changed. Also allow for similar dependencies with
'headers_check', once we properly create the dependencies for those.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-09-24 22:15:14 +01:00
Ian McDonald e41542f516 [DCCP]: Introduce dccp_probe
This adds DCCP probing shamelessly ripped off from TCP probes by Stephen
Hemminger.

I've put in here support for further CCID3 variables as well.
Andrea/Arnaldo might look to extend for CCID2.

Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-09-24 18:08:17 -03:00
David Woodhouse b4daf69722 [S390] Unexport <asm/z90crypt.h>, export <asm/zcrypt.h> in its place.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-09-24 22:07:25 +01:00
David Woodhouse 9e72cbf353 Remove dead netfilter_logging.h from include/linux/Kbuild
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
2006-09-24 22:06:48 +01:00
David Woodhouse 02b25fcff6 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2006-09-24 22:05:59 +01:00
Ian McDonald 3dd9a7c3a1 [DCCP]: Use constants for CCIDs
With constants for CCID numbers this now uses them in some places.

Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-09-24 18:03:41 -03:00
Ian McDonald b83eff641e [DCCP]: Introduce constants for CCID numbers
Signed-off-by: Ian McDonald <ian.mcdonald@jandi.co.nz>
Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
2006-09-24 17:56:32 -03:00
Mark Fasheh 0d5dc6c2dd ocfs2: Teach ocfs2_drop_lock() to use ->set_lvb() callback
With this, we don't need to pass an additional struct with function pointer.

Now that the callbacks are fully used, comment the remaining API.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-09-24 13:50:48 -07:00
Mark Fasheh b5e500e23e ocfs2: Remove ->unblock lockres operation
Have ocfs2_process_blocked_lock() call ocfs2_generic_unblock_lock(), which
gets to be ocfs2_unblock_lock() now that it's the only possible unblock
function.

Remove the ->unblock() callback from the structure, and all lock type
specific unblock functions.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-09-24 13:50:48 -07:00
Mark Fasheh cc567d89b3 ocfs2: move downconvert worker to lockres ops
This way lock types don't have to manually pass it to
ocfs2_generic_unblock_lock().

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-09-24 13:50:48 -07:00
Mark Fasheh 08280f11de ocfs2: Remove unused dlmglue functions
The meta data unblocking code no longer needs ocfs2_do_unblock_meta() or
ocfs2_can_downconvert_meta_lock(), so remove them.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-09-24 13:50:48 -07:00
Mark Fasheh 810d5aeba1 ocfs2: Have the metadata lock use generic dlmglue functions
Fill in the ->check_downconvert and ->set_lvb callbacks with meta data
specific operations and switch ocfs2_unblock_meta() to call
ocfs2_generic_unblock_lock()

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-09-24 13:50:47 -07:00
Mark Fasheh 5ef0d4ea08 ocfs2: Add ->set_lvb callback in dlmglue
This allows a lock type to set the value block before downconvert.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-09-24 13:50:47 -07:00
Mark Fasheh 16d5b9567a ocfs2: Add ->check_downconvert callback in dlmglue
This will allow lock types to force a requeue of a lock downconvert.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-09-24 13:50:47 -07:00
Mark Fasheh f7fbfdd1fc ocfs2: Check for refreshing locks in generic unblock function
Tidy up the exit path a bit too.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-09-24 13:50:47 -07:00
Mark Fasheh b80fc012e0 ocfs2: don't unconditionally pass LVB flags
Allow a lock type to specifiy whether it makes use of the LVB. The only type
which does this right now is the meta data lock. This should save us some
space on network messages since they won't have to needlessly transmit value
blocks.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-09-24 13:50:47 -07:00
Mark Fasheh aa2623ad80 ocfs2: combine inode and generic blocking AST functions
There is extremely little difference between the two now. We can remove the
callback from ocfs2_lock_res_ops as well.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-09-24 13:50:46 -07:00
Mark Fasheh 54a7e7552e ocfs2: Add ->get_osb() dlmglue locking operation
Will be used to find the ocfs2_super structure from a given lockres.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-09-24 13:50:46 -07:00
Mark Fasheh 2a45f2d13e ocfs2: remove ->unlock_ast() callback from ocfs2_lock_res_ops
This was always defined to the same function in all locks, so clean things
up by removing and passing ocfs2_unlock_ast() directly to the DLM.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-09-24 13:50:46 -07:00
Mark Fasheh e92d57df27 ocfs2: combine inode and generic AST functions
There is extremely little difference between the two now. We can remove the
callback from ocfs2_lock_res_ops as well.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-09-24 13:50:46 -07:00
Mark Fasheh f625c9793b ocfs2: Clean up lock resource refresh flags
Use of the refresh mechanism is lock-type wide, so move knowledge of that to
the ocfs2_lock_res_ops structure.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-09-24 13:50:46 -07:00
Mark Fasheh 24c19ef404 ocfs2: Remove i_generation from inode lock names
OCFS2 puts inode meta data in the "lock value block" provided by the DLM.
Typically, i_generation is encoded in the lock name so that a deleted inode
on and a new one in the same block don't share the same lvb.

Unfortunately, that scheme means that the read in ocfs2_read_locked_inode()
is potentially thrown away as soon as the meta data lock is taken - we
cannot encode the lock name without first knowing i_generation, which
requires a disk read.

This patch encodes i_generation in the inode meta data lvb, and removes the
value from the inode meta data lock name. This way, the read can be covered
by a lock, and at the same time we can distinguish between an up to date and
a stale LVB.

This will help cold-cache stat(2) performance in particular.

Since this patch changes the protocol version, we take the opportunity to do
a minor re-organization of two of the LVB fields.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-09-24 13:50:46 -07:00
Mark Fasheh f9e2d82e63 ocfs2: Encode i_generation in the meta data lvb
When i_generation is removed from the lockname, this will help us determine
whether a meta data lvb has information that is in sync with the local
struct inode.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-09-24 13:50:45 -07:00
Mark Fasheh 4d3b83f736 ocfs2: Free up some space in the lvb
lvb_version doesn't need to be a whole 32 bits. Make it an 8 bit field to
free up some space. This should be backwards compatible until we use one of
the fields, in which case we'd bump the lvb version anyway.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-09-24 13:50:45 -07:00
Mark Fasheh 0027dd5bc2 ocfs2: Remove special casing for inode creation in ocfs2_dentry_attach_lock()
We can't use LKM_LOCAL for new dentry locks because an unlink and subsequent
re-create of a name/inode pair may result in the lock still being mastered
somewhere in the cluster.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-09-24 13:50:45 -07:00
Mark Fasheh 1ba9da2ffa ocfs2: manually d_move() during ocfs2_rename()
Make use of FS_RENAME_DOES_D_MOVE to avoid a race condition that can occur
during ->rename() if we d_move() outside of the parent directory cluster
locks, and another node discovers the new name (created during the rename)
and unlinks it. d_move() will unconditionally rehash a dentry - which will
leave stale data in the system.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-09-24 13:50:45 -07:00
Mark Fasheh 349457ccf2 [PATCH] Allow file systems to manually d_move() inside of ->rename()
Some file systems want to manually d_move() the dentries involved in a
rename.  We can do this by making use of the FS_ODD_RENAME flag if we just
have nfs_rename() unconditionally do the d_move().  While there, we rename
the flag to be more descriptive.

OCFS2 uses this to protect that part of the rename operation with a cluster
lock.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
2006-09-24 13:50:45 -07:00
Mark Fasheh 1390334b4c ocfs2: Remove the dentry vote
This is unused now.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-09-24 13:50:43 -07:00
Mark Fasheh 379dfe9d0d ocfs2: Hook rest of the file system into dentry locking API
Actually replace the vote calls with the new dentry operations. Make any
necessary adjustments to get the scheme to work.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-09-24 13:50:43 -07:00
Mark Fasheh 80c05846f6 ocfs2: Add dentry tracking API
Replace the dentry vote mechanism with a cluster lock which covers a set
of dentries. This allows us to force d_delete() only on nodes which actually
care about an unlink.

Every node that does a ->lookup() gets a read only lock on the dentry, until
an unlink during which the unlinking node, will request an exclusive lock,
forcing the other nodes who care about that dentry to d_delete() it. The
effect is that we retain a very lightweight ->d_revalidate(), and at the
same time get to make large improvements to the average case performance of
the ocfs2 unlink and rename operations.

This patch adds the higher level API and the dentry manipulation code.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-09-24 13:50:43 -07:00
Mark Fasheh d680efe9d8 ocfs2: Add new cluster lock type
Replace the dentry vote mechanism with a cluster lock which covers a set
of dentries. This allows us to force d_delete() only on nodes which actually
care about an unlink.

Every node that does a ->lookup() gets a read only lock on the dentry, until
an unlink during which the unlinking node, will request an exclusive lock,
forcing the other nodes who care about that dentry to d_delete() it. The
effect is that we retain a very lightweight ->d_revalidate(), and at the
same time get to make large improvements to the average case performance of
the ocfs2 unlink and rename operations.

This patch adds the cluster lock type which OCFS2 can attach to
dentries.  A small number of fs/ocfs2/dcache.c functions are stubbed
out so that this change can compile.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-09-24 13:50:42 -07:00
Mark Fasheh f0681062b8 ocfs2: Update dlmglue for new dlmlock() API
File system lock names are very regular right now, so we really only need to
pass an extra parameter to dlmlock().

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-09-24 13:50:42 -07:00
Mark Fasheh ea5b3a187e ocfs2: Update dlmfs for new dlmlock() API
We just need to add a namelen field to the user_lock_res structure, and
update a few debug prints. Instead of updating all debug prints, I took the
opportunity to remove a few that are likely unnecessary these days.

Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
2006-09-24 13:50:42 -07:00