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 066c112214036c6771ec130395c68d76b8d51e3b
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Fri Dec 28 13:32:01 2007 -0500
Unionfs: release 2.2
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 381a38621ae8efb76f7194e7b4f703ebf53b6c37
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Fri Dec 28 10:39:37 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 6ba8578b0611d1134b5b9ffc80ac98034cc31c30
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Thu Dec 27 19:14:45 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 5e76dba18d7f6e2bca345f724d81619b30408c16
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Thu Dec 27 19:22:44 2007 -0500
Unionfs: don't check dentry on error
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 7f94ea2914913b47cf33e3340ebfa2a0e0d220cb
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 6b66583f8f3067949b456d03e7005a27b4d64bbc
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:02:52 2007 -0500
Unionfs: initialize namelist variable in rename
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit b4b9713bab354b926744d434a0b3cf67a29ddf2b
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:02:52 2007 -0500
Unionfs: minor cleanup in check_empty
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 7a0b02c5b826130f4ed2aa83ac7a95cb7e61f88c
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:02:52 2007 -0500
Unionfs: update inode times after a successful open
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 96582b873a5a7590465e5c44b5b7505f5f638f57
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:02:52 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 5b7ae26c484ee241a2456002e9f6d0b33317bba8
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Fri Dec 28 13:46:20 2007 -0500
Unionfs: handle on lower inodes in lookup
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit cc4e675b8460ea81a55f45aee267681aff2da312
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:02:52 2007 -0500
Unionfs: minor code rearrangement in rename
To avoid too much code nesting.
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit a2ad192c593f585e3b8457a103c1fa023c6d5e3d
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Fri Dec 28 13:38:16 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 2a3500d0942673c18a4299d8a58e134995537138
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Thu Dec 27 13:42:54 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 a9d0b19094a78743cff4c199df689eee3daa3d4c
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:02:52 2007 -0500
Unionfs: remove unnecessary parent lock in create
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit a574c08ffb2841e97334b747dd7ab86ccad401af
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:02:52 2007 -0500
Unionfs: remove unnecessary locking in follow-link
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit caf76c40cab9d0d9a72c12f4d6855971eb382e61
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:02:52 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 9d4788842e5d16f64f7f8cf7795afdad1c0edd7c
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:02:52 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 3e7d3599b0790c4a31be068a8a01c1fd1c11fad4
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:02:52 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 34c840820e73124a17381d2b8c7190c46adbdcda
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:47:44 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 bc909f530ea9a7e8319af74785545a208d327d2d
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:02:52 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 c6be214658711dbb64872b2a659e86e27662350a
Author: Hugh Dickins <[EMAIL PROTECTED]>
Date: Fri Dec 28 13:41:46 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 397461b08f87d12a4a014bfecda092715db3248c
Author: Hugh Dickins <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:02:52 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 707d7d19db21d4e65bf2c60c541b1944afe59650
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:02:52 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 a7929b39b97d7b0a306a8516e47001e0161c99e3
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:02:52 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 a3eb3330075428d8081eb859bce875c717d43313
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:02:52 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 e75ac6b43fb07d0a2d04a872a2dcf2d43d9427f8
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:02:52 2007 -0500
Unionfs: initialize inode times for reused inodes
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit e7167bdb134389278f52e872c1395cc7ada3a4bc
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:02:52 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 6d9e90159ba9486da70f3651fb8aa1d0e187ad43
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Fri Dec 28 14:08:33 2007 -0500
Unionfs: clarify usage.txt read/write behavior
CC: Michael Tokarev <[EMAIL PROTECTED]>
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit cdd00c316476d333713ad7e976efa76a3acaf836
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:02:52 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 7664900b2d7e032bf429dc83188a67f6e2c33422
Author: Hugh Dickins <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:02:52 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 03972886a6d2c147ce248eaa4d59ddcc25010d72
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:02:52 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 fab2c3b2770be8fad5d865429d136fa6b214ad02
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:02:52 2007 -0500
Unionfs: clarify usage.txt mount options
CC: Jim Kissel <[EMAIL PROTECTED]>
Signed-off-by: Erez Zadok <[EMAIL PROTECTED]>
commit 54090710d65c45256d46c988f681ccc277eaac10
Author: Erez Zadok <[EMAIL PROTECTED]>
Date: Tue Dec 25 17:02:52 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