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 | 8 +-
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, 657 insertions(+), 584 deletions(-)
New commits:
commit e8f05c4b565121de8d9cd76f4a69ff64c868dd6b
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Fri Dec 28 13:31:59 2007 -0500
Unionfs: release 2.2
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit d71a8f60c895b3923f3171ff7fe6fe421e098a8c
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Fri Dec 28 10:38:31 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 3c1c6d553a6ce99f0905e81207afc45012335845
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Thu Dec 27 19:14:42 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 93f584ac3dc51fff1d218f9156e86e5be636bac4
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Thu Dec 27 19:22:41 2007 -0500
Unionfs: don't check dentry on error
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit a61ea9e545c7a71b6da15d40c61eb66b18cb0b16
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 489e8641a6a4481f8ec1486ea127d81a9dde8c11
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:01:40 2007 -0500
Unionfs: initialize namelist variable in rename
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit e2e9dc4c3b71048269acbc9bec77bcbdc6b41889
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:01:40 2007 -0500
Unionfs: minor cleanup in check_empty
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 90834da4a6be1ac7030de0f53d1095b4d7334bbb
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:01:40 2007 -0500
Unionfs: update inode times after a successful open
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 644de205d3b63c3850290c1322857ab9d9497252
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:01:40 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 5f9b76c65910299e45efabff1b9ee4e7b779f6a8
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Fri Dec 28 13:46:18 2007 -0500
Unionfs: handle on lower inodes in lookup
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit c00df85a9eff497222cbc88ea4ebe8705f499493
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:01:40 2007 -0500
Unionfs: minor code rearrangement in rename
To avoid too much code nesting.
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 16ad16c0ca9128cc8bd7366c809b0c5eeee7e7d6
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Fri Dec 28 13:38:14 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 4e17e14f7db5933f0d07c31e2eb737d65080f5b7
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Thu Dec 27 13:42:22 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 2de4c622b218a024e98e21bd666ab3ec546e9709
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:01:40 2007 -0500
Unionfs: remove unnecessary parent lock in create
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit f4780fee417d33b1197badb8985bb89a88eea671
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:01:40 2007 -0500
Unionfs: remove unnecessary locking in follow-link
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit d0ab2e844fcdc43249bd1216c1d9994b0662b83c
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:01:40 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 dc9e03f494273b5c8f3780747df2c7057fa44814
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:01:40 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 c52f3de60b207905f3b9fdaf90ed1888dd2e34d8
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:01:40 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 5c6d95099f8477c0492e5226ea983cfc956fd50c
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:01:40 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 aa67507e933dbc82cb06e53e31888e76707e48a0
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:01:40 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 9b8054c56f28183c13fd084dc42f9e3ab4c572bf
Author: Hugh Dickins <[EMAIL PROTECTED]>
Date: Fri Dec 28 13:41:45 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 63c6c06d63f23bfb6c092ebbf47a065b5399f114
Author: Hugh Dickins <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:01:40 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 4a3c6185a0b86e30ce6f5b325fc67944d4820332
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:01:40 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 a3d9f02237c148bec5e5d1a491b5775169b6edc5
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:01:40 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 813cf83bf851b9506d8bbdc510b08dbd3669916b
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:01:40 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 3902ee39c3a3ebf11a87b547eafe341cc0dc3fcf
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:01:40 2007 -0500
Unionfs: initialize inode times for reused inodes
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 30d97bf4ad39b5866e6d9de787c966f965ebe36f
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:01:40 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 205a23c0a094b5c8d65a7443b8d4a9ce653a7c56
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Fri Dec 28 14:08:30 2007 -0500
Unionfs: clarify usage.txt read/write behavior
CC: Michael Tokarev <[EMAIL PROTECTED]>
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit edb4cd6307d9611bd198f69710befc5e39e81ee9
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:01:40 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 607e58e582509179693999a752dbfe7fcbd81b62
Author: Hugh Dickins <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:01:40 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 afdedf53a37ad4e1cc41084038aecf9285da3aa9
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:01:40 2007 -0500
VFS/fs_stack: drop cast on inode passed to i_size_read
i_size_read() takes 'const struct inode *' already, as of 2.6.20.
CC: Mike Halcrow <[EMAIL PROTECTED]>
Signed-off-by: Jan Engelhardt <[EMAIL PROTECTED]>
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 35b1d90079266a83a0a79db14d41bbeabf5dc976
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:01:40 2007 -0500
Unionfs: clarify usage.txt mount options
CC: Jim Kissel <[EMAIL PROTECTED]>
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 7366530b005993b81c8c3e01d9d7a7ab4b2ad58e
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:01:40 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