Documentation/filesystems/unionfs/concepts.txt | 20 +-
Documentation/filesystems/unionfs/issues.txt | 12 +-
Documentation/filesystems/unionfs/usage.txt | 43 ++-
fs/stack.c | 6 +
fs/unionfs/Makefile | 2 +-
fs/unionfs/commonfops.c | 22 +-
fs/unionfs/compat.h | 7 +
fs/unionfs/copyup.c | 16 +-
fs/unionfs/dentry.c | 112 +++--
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 | 21 +-
fs/unionfs/mmap.c | 33 +-
fs/unionfs/rename.c | 122 +++---
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 +-
23 files changed, 673 insertions(+), 580 deletions(-)
New commits:
commit e2d7b49c57ca0eca17f9bac6882a8c686950c8f1
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Fri Dec 28 13:32:06 2007 -0500
Unionfs: release 2.2
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit e7d8f2ba8ce288838d7220ac86285663c18b2f4c
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Fri Dec 28 10:47:48 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 7beaec45b800f2268fc3cbdf6356e6f7e0d99ba4
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Thu Dec 27 19:14:55 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 dcfd3780a3744441d39d87c14487066fda293b3d
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Thu Dec 27 19:22:49 2007 -0500
Unionfs: don't check dentry on error
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit d7f0927cb2a2a9f8be1f01346a214117d8d6231f
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Thu Dec 27 19:17:10 2007 -0500
Unionfs: cleanup lower inodes after successful unlink
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit b86be85973682182b23fae22e682a2acd8b481b5
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:08:50 2007 -0500
Unionfs: initialize namelist variable in rename
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 0771169d8a53e46a80cac21b9b5079e1c7e9dcd7
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:08:50 2007 -0500
Unionfs: minor cleanup in check_empty
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit af4b3722061862b75f3f8ed1109f76795592734c
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:31:14 2007 -0500
Unionfs: update inode times after a successful open
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 67c55e2c31d672ffcd8323075bf7124459e2f983
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 18:22:37 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 5c3a1c16a6f3bc49a5962b977ad8b0af84cef01d
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Fri Dec 28 13:46:24 2007 -0500
Unionfs: handle on lower inodes in lookup
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit d3cdfe2ca9fec62877f934a2007d8783a38a5704
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:08:50 2007 -0500
Unionfs: minor code rearrangement in rename
To avoid too much code nesting.
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 968957120f901af89196d4acfe2a76e43f7bf664
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Fri Dec 28 13:38:20 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 1787fda3f4fc427ee18fd275ce669115734df845
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Thu Dec 27 13:43:34 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 101914f949aa57392e914eeef3fed749eb754df8
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:08:50 2007 -0500
Unionfs: remove unnecessary parent lock in create
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit c95db6529af16b4d54229aeb95cfdac6780a975b
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:19:41 2007 -0500
Unionfs: remove unnecessary locking in follow-link
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 93353ac18f530a62e415656f890c3648189bfde4
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:08:50 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 67329e2cf64aec77eebb4ff1d32dd268fb96dd7b
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:08:50 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 d107bba8a99d53f1b7e314171536f786b1a7069f
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:08:50 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 1e4e35e74acc733382e1d49c66abfd098d14e8f4
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 18:13:42 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 b652dc2f84015cf4b4e690d9d77f682783a72eb9
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:18:48 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 9ea2fbad55d7999279fd5dfafac362ce2c890a9d
Author: Hugh Dickins <[EMAIL PROTECTED]>
Date: Fri Dec 28 13:41:51 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 f6f613ecef564de5385dc1c1c5e969a8daf01fb6
Author: Hugh Dickins <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:16:51 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 e69a005132738eba112e0e7737b79217aa1a5082
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:08:50 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 777885c75963adcce008b414df2c52c1a7792309
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:08:50 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 7881c703fc1822f5f1a2ed8317a9658beeaa26a9
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:08:50 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 9453bb070f24122daebe1ac29a002eb736295069
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:08:50 2007 -0500
Unionfs: initialize inode times for reused inodes
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 6db7e1ab703d45227df65bc1c39188403500bcf8
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:08:50 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 1f93d8b51afd6e5b64583bb02d9a87d1ac14bade
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Fri Dec 28 14:08:41 2007 -0500
Unionfs: clarify usage.txt read/write behavior
CC: Michael Tokarev <[EMAIL PROTECTED]>
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 7d29365f758169dc69149d0d30a52297be6cc56e
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:08:50 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 e77f817a0bdf7d715878fc757379a8cf1b367f9a
Author: Hugh Dickins <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:37:37 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 6ef30b78c02cfa137a634bc5c0ff58eac1f6e336
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:08:50 2007 -0500
Unionfs: clarify usage.txt mount options
CC: Jim Kissel <[EMAIL PROTECTED]>
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit b70329f9ab0fb0ac41336345ed528a4ebaca10ee
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 18:07:50 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