Documentation/filesystems/unionfs/concepts.txt | 20 +-
Documentation/filesystems/unionfs/issues.txt | 12 +-
Documentation/filesystems/unionfs/usage.txt | 43 ++-
fs/drop_caches.c | 4 +-
fs/stack.c | 6 +
fs/unionfs/Makefile | 2 +-
fs/unionfs/commonfops.c | 22 +-
fs/unionfs/copyup.c | 16 +-
fs/unionfs/dentry.c | 110 +++--
fs/unionfs/dirfops.c | 4 +-
fs/unionfs/dirhelper.c | 11 +-
fs/unionfs/fanout.h | 14 +-
fs/unionfs/file.c | 53 +--
fs/unionfs/inode.c | 580 ++++++++++++------------
fs/unionfs/lookup.c | 20 +-
fs/unionfs/main.c | 19 +-
fs/unionfs/mmap.c | 33 +-
fs/unionfs/rename.c | 114 +++---
fs/unionfs/subr.c | 4 +-
fs/unionfs/super.c | 65 ++--
fs/unionfs/union.h | 39 +-
fs/unionfs/unlink.c | 31 +-
fs/unionfs/xattr.c | 16 +-
include/linux/mm.h | 1 -
24 files changed, 656 insertions(+), 583 deletions(-)
New commits:
commit 87eb247ba7c8a81c76f3511efc7d903e0d870e45
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Fri Dec 28 13:32:02 2007 -0500
Unionfs: release 2.2
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 40371f0690ee3bec38babcc81a3e688c1b0bfd73
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Fri Dec 28 10:40:43 2007 -0500
Unionfs: don't check parent dentries
Parent dentries may not be locked and may change, so don't check them. But
do check parent inodes if they are passed to the method. Also, ensure the
checks are done only if no error occurred.
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit f4a5f3859099913c66435485ddf84a6e91f6fe8f
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Thu Dec 27 19:14:47 2007 -0500
Unionfs: implement d_iput method
This is needed to drop lower objects early enough, under certain conditions,
so the lower objects don't stay behind until umount(). [LTP testing]
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 11c70c20713591a5ea30d859fde1bf91e4add335
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Thu Dec 27 19:22:46 2007 -0500
Unionfs: don't check dentry on error
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 2e9224ebcc0db812b932a284ea380dfd574cbde7
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Thu Dec 27 19:17:09 2007 -0500
Unionfs: cleanup lower inodes after successful unlink
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit d10a9e1278408b9fd577807dee260a98c52cdd01
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:03:29 2007 -0500
Unionfs: initialize namelist variable in rename
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 08b3c028dd9282b3824b7609483e5af77cb6a70a
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:03:29 2007 -0500
Unionfs: minor cleanup in check_empty
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit b65e4ab2d86ca559e0639e4c4b081a3ed6771433
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:03:29 2007 -0500
Unionfs: update inode times after a successful open
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 4d79b8f55efdcc482df19814b58dae7610eacf73
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:03:29 2007 -0500
Unionfs: set our superblock a/m/ctime granularity
Set it to 1 ns, because we could be stacked on top of file systems with such
granularity.
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 250aa4c3f180a35493725c2b7b0499160f7e407a
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Fri Dec 28 13:46:21 2007 -0500
Unionfs: handle on lower inodes in lookup
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit e869a844d38b6b7d5f17c6d927e51ca0474cd8b9
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:03:29 2007 -0500
Unionfs: minor code rearrangement in rename
To avoid too much code nesting.
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 8c38ba137c5f5117e00298176dbc08bb1edc0dde
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Fri Dec 28 13:38:17 2007 -0500
Unionfs: implement lockdep classes
Lockdep fixes. Support locking order/classes (e.g., parent -> child ->
whiteout). Remove locking from create_parents: it's enough to just dget the
dentries in question. Move parent locking to from lookup_backend to caller,
unionfs_lookup.
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 46c4fe1b2c5c9e11400c6c47cb6f2990b3e71663
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Thu Dec 27 13:43:08 2007 -0500
Unionfs: prevent false lockdep warnings in stacking
A stackable file system like unionfs often performs an operation on a lower
file system, by calling a vfs_* method, having been called possibly by the
very same method from the VFS. Both calls to the vfs_* method grab a lock
in the same lock class, and hence lockdep complains. This warning is a
false positive in instances where unionfs only calls the vfs_* method on
lower objects; there's a strict lock ordering here: upper objects first,
then lower objects.
We want to prevent these false positives so that lockdep will not shutdown
so it'd still be able to warn us about potentially true locking problems.
So, we temporarily turn off lockdep ONLY AROUND the calls to vfs methods to
which we pass lower objects, and only for those instances where lockdep
complained. While this solution may seem unclean, it is not without
precedent: other places in the kernel also do similar temporary disabling,
of course after carefully having checked that it is the right thing to do.
In the long run, lockdep needs to be taught how to handle about stacking.
Then this patch can be removed. It is likely that such lockdep-stacking
support will do essentially the same as this patch: consider the same
ordering (upper then lower) and consider upper vs. lower locks to be in
different classes.
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit a00af0ccec1f376c12144c4befb9c69ca969201a
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:03:29 2007 -0500
Unionfs: remove unnecessary parent lock in create
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit e0a6831c1ec2b2ef8e83f0faab4624a7facaea66
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:03:29 2007 -0500
Unionfs: remove unnecessary locking in follow-link
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 239f2dc1c9e4e2e02ac7a373cca6af450096b640
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:03:29 2007 -0500
Unionfs: remove unnecessary lock in read_inode
Our read_inode doesn't need to grab the superblock rwsem because there no
chance it could be affected by branch management. But our read_inode was
called from other places which did grab need to grab that rwsem, and lockdep
complained.
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 1ca0261d166195d4e6f609fc5a9cb516ffd808c3
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:03:29 2007 -0500
Unionfs: remove unnecessary lock when deleting whiteouts
Lockdep complained, because we eventually call vfs_unlink which'd grab the
necessary locks.
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 44a3a1a4e2cde411f5cba6d58d81b984e1273a6e
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:03:29 2007 -0500
Unionfs: remove unnecessary conditional inode lock
This was intended to protect the inode during branch management, but that is
now done through our superblock rwsem.
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 71848db231b0dedd166f9478e3469b1626774746
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:51:46 2007 -0500
Unionfs: prevent deadlock in cache coherency
Don't try to truncate_inode_pages in in purge_inode_data, because this could
lead to a deadlock between some of address_space ops and dentry
revalidation: the address space op is invoked with a lock on our own page,
and truncate_inode_pages will block on locked pages. Instead, it should be
enough to be gentler and just invalidate_mapping_pages.
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 52255f450fca5dc9387ac75370edeb0032c7cca5
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:03:29 2007 -0500
Unionfs: remove custom read/write methods
Having them results in lockdep warnings about having locks and grabbing the
same class locks in do_sync_read/write which were called from
unionfs_read/write. All they did was revalidate out file object sooner,
which will now be deferred till a bit later. Instead, use generic
do_sync_read and do_sync_write.
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 64d596bfbd59c03c93696a966ed87b97c51f7571
Author: Hugh Dickins <[EMAIL PROTECTED]>
Date: Fri Dec 28 13:41:48 2007 -0500
Unionfs: restructure unionfs_setattr and fix truncation order
Restructure the code to move the lower notify_change out of the loop in
unionfs_setattr. Cleanup and simplify the code. Then fix the truncation
order which fsx-linux in a unionfs on tmpfs found. Then handle copyup
properly.
When shrinking a file, unionfs_setattr needs to vmtruncate the upper level
before notifying change to the lower level, to eliminate those dirty pages
beyond new eof which otherwise drift down to the lower level's writepage,
writing beyond its eof (and later uncovered when the file is expanded).
Also truncate the upper level first when expanding, in the case when
the upper level's s_maxbytes is more limiting than the lower level's.
Signed-off-by: Hugh Dickins <[EMAIL PROTECTED]>
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 03f66af1f19867b84e9e2ad0b55a8063aa23118c
Author: Hugh Dickins <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:03:29 2007 -0500
Unionfs: mmap fixes
Remove !mapping_cap_writeback_dirty shortcircuit from unionfs_writepages.
It was introduced to avoid the stray AOP_WRITEPAGE_ACTIVATE coming from
shmem_writepage; but that has since been fixed in shmem_writepage and in
write_cache_pages. It stayed because it looked like a good optimization,
not to waste time calling down to tmpfs when that would serve no purpose.
But in fact this optimization causes hangs when running LTP with unionfs
over tmpfs. The problem is that the test comes at the wrong level: unionfs
has already declared in its default_backing_dev_info that it's playing by
cap_writeback_dirty rules. If it does nothing here in its writepages, its
dirty pages accumulate and choke the system. What's needed is to carry on
down and let its pages be cleaned while in turn they dirty the lower level.
And this now has an additional benefit for tmpfs, that a sync or pdflush
pushes these pages down to shmem_writepage, letting it match the filepage
coming from unionfs with the swap which may have been allocated earlier,
so it can free the duplication sooner than waiting for further pressure.
Remove unnecessary locking/code from prepare_write. Handle if no lower
inodes in writepage.
Signed-off-by: Hugh Dickins <[EMAIL PROTECTED]>
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 700ed365d461caf483b46be040b08e88078657a8
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:03:29 2007 -0500
Unionfs: release special files on copyup
If we copyup a special file (char, block, etc.), then dput the source
object.
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 4dcdff82e9b4bbfd33d2394f3fa699033b8f2c7a
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:03:29 2007 -0500
Unionfs: create new symlinks only in first branch
When creating a new symlink, always create it in the first branch, which is
always writeable, not in the branch which may have a whiteout in it. This
makes the policy for the creation of new symlinks consistent with that of
new files/directories, as well as improves efficiency a bit.
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 2eb57abdd1e318794705867a2a581c3cdad19ca1
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:03:29 2007 -0500
Unionfs: create new special files only in first branch
When creating a new special file, always create it in the first branch,
which is always writeable, not in the branch which may have a whiteout in
it. This makes the policy for the creation of new special files consistent
with that of new files/directories, as well as improves efficiency a bit.
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit cdeddd9545e2eba1179bd9602e2c539d4efc2b22
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:03:29 2007 -0500
Unionfs: initialize inode times for reused inodes
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 0406b0ce3cdf175370c1898f9dc86102f32ef8d2
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:03:29 2007 -0500
Unionfs: interpose cleanup and fix for spliced dentries
Fix unionfs_interpose to fill lower inode info when d_splice_alias returns
NULL. Also cleanup impossible case (d_splice_alias doesn't return ERR_PTR).
Signed-off-by: Rachita Kothiyal <[EMAIL PROTECTED]>
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 468d23f29d342c8af8b67f8826d8304a32821b5a
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Fri Dec 28 14:08:37 2007 -0500
Unionfs: clarify usage.txt read/write behavior
CC: Michael Tokarev <[EMAIL PROTECTED]>
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 2533a2107785d6cf4df1a7f3a951af8b1b8271e3
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:03:29 2007 -0500
Unionfs: use locking around i_size_write in 32-bit systems
CC: Hugh Dickins <[EMAIL PROTECTED]>
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit fcff4e691495b5748b2aa490f96b0d4e35eeb537
Author: Hugh Dickins <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:38:26 2007 -0500
VFS/fs_stack: use locking around i_size_write in 32-bit systems
LTP's iogen01 doio tests hang nicely on 32-bit SMP when /tmp is a unionfs
mount of a tmpfs. See the comment on i_size_write in linux/fs.h: it needs
to be locked, otherwise i_size_read can spin forever waiting for a lost
seqcount update.
Most filesystems are already holding i_mutex for this, but unionfs calls
fsstack_copy_inode_size from many places, not necessarily holding i_mutex.
Use the low-level i_lock within fsstack_copy_inode_size when 32-bit SMP.
Checked the entire unionfs code to ensure this is the right fix for
i_size_write().
Also compared to what other file systems do when they have to handle inodes,
esp. not their own inodes (e.g., network file systems have to access the
exported file system's inodes). Found out that most such file systems not
just
don't lock around i_size_write, but they don't even use i_size_read or
i_size_write to access the inode's size.
CC: Mike Halcrow <[EMAIL PROTECTED]>
Signed-off-by: Hugh Dickins <[EMAIL PROTECTED]>
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 0634b3fd558b83fc72328d3c6b96f14a992a5bf0
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:03:29 2007 -0500
Unionfs: clarify usage.txt mount options
CC: Jim Kissel <[EMAIL PROTECTED]>
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit fd46ed8f766bffc8cde268e4528b3dfd3afe919d
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:03:29 2007 -0500
Unionfs: avoid using drop_pagecache_sb in remount
Exporting drop_pagecache_sb to modules is somewhat risky because one cannot
sleep inside invalidate_mapping_pages. This could cause a lot of latency in
the pre-emption code. So don't export this symbol to minimize the risk that
others will use it.
Instead, unionfs will try to directly invalidate as many pages it can from
the unionfs_remount code. Invalidating those inode pages is not strictly
required, but helpful in encouraging a revalidation of inodes sooner than
waiting for individual f/s ops to access the union. Since a remount is
already an expensive but rare operation, this inode pages invalidation
shouldn't add too much overhead.
CC: Nick Piggin <[EMAIL PROTECTED]>
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
_______________________________________________
unionfs-cvs mailing list: http://unionfs.filesystems.org/
[email protected]
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs-cvs