Erez Zadok [Thu, 10 Jan 2008 11:59:15 +0000 (06:59 -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 <ezk@cs.sunysb.edu>
Erez Zadok [Thu, 10 Jan 2008 11:58:19 +0000 (06:58 -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 <ezk@cs.sunysb.edu>
Erez Zadok [Thu, 10 Jan 2008 11:57:30 +0000 (06:57 -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 <ezk@cs.sunysb.edu>
Hugh Dickins [Thu, 10 Jan 2008 11:56:50 +0000 (06:56 -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 <hugh@veritas.com>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Hugh Dickins [Thu, 10 Jan 2008 11:55:57 +0000 (06:55 -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 <hugh@veritas.com>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Thu, 10 Jan 2008 11:55:01 +0000 (06:55 -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 <ezk@cs.sunysb.edu>
Erez Zadok [Thu, 10 Jan 2008 11:54:22 +0000 (06:54 -0500)]
Unionfs: initialize inode times for reused inodes
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Thu, 10 Jan 2008 11:53:30 +0000 (06:53 -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 <rachita@fsl.cs.sunysb.edu>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Thu, 10 Jan 2008 11:52:20 +0000 (06:52 -0500)]
Unionfs: clarify usage.txt read/write behavior
CC: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Thu, 10 Jan 2008 11:51:29 +0000 (06:51 -0500)]
Unionfs: use locking around i_size_write in 32-bit systems
CC: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Hugh Dickins [Thu, 10 Jan 2008 11:50:49 +0000 (06:50 -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 <mhalcrow@us.ibm.com>
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Thu, 10 Jan 2008 11:49:42 +0000 (06:49 -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 <mhalcrow@us.ibm.com>
Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Rachita Kothiyal [Wed, 19 Dec 2007 04:11:42 +0000 (23:11 -0500)]
Unionfs ODF2: Fix compilation warnings from exports patch
Signed-off-by: Rachita Kothiyal <rachita@fsl.cs.sunysb.edu>
Rachita Kothiyal [Sun, 16 Dec 2007 18:13:21 +0000 (13:13 -0500)]
Unionfs ODF2: Documenting the export operations for Unionfs
Signed-off-by: Rachita Kothiyal <rachita@fsl.cs.sunysb.edu>
Rachita Kothiyal [Sun, 16 Dec 2007 08:11:01 +0000 (03:11 -0500)]
Unionfs ODF2: unionfs_interpose fixup
Fix unionfs_interpose to fill lower inode info when d_splice_alias
returns NULL
Signed-off-by: Rachita Kothiyal <rachita@fsl.cs.sunysb.edu>
Rachita Kothiyal [Sun, 16 Dec 2007 08:08:41 +0000 (03:08 -0500)]
Unionfs ODF2: Fixes to make unionfs exportable
Signed-off-by: Rachita Kothiyal <rachita@fsl.cs.sunysb.edu>
Erez Zadok [Thu, 13 Dec 2007 22:17:49 +0000 (17:17 -0500)]
Unionfs: clarify usage.txt mount options
CC: Jim Kissel <jlk@osml.eu>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Thu, 13 Dec 2007 15:51:15 +0000 (10:51 -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 <nickpiggin@yahoo.com.au>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sat, 8 Dec 2007 18:47:40 +0000 (13:47 -0500)]
Unionfs ODF: release 2.1.11
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sat, 8 Dec 2007 18:45:55 +0000 (13:45 -0500)]
Unionfs: reduce the amount of cache-coherency debugging messages
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sat, 8 Dec 2007 18:44:27 +0000 (13:44 -0500)]
Unionfs: cleanup/consolidate branch-mode parsing code
Also a bug fix: disallow unrecognized branch modes at mount time, instead of
defaulting to "rw".
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 7 Dec 2007 00:45:04 +0000 (19:45 -0500)]
Unionfs ODF: use krealloc() in create_parents()
Prevents compile error with CONFIG_SLUB:
$ make
fs/unionfs/copyup.c: In function 'create_parents':
fs/unionfs/copyup.c:694: error: 'malloc_sizes' undeclared (first use in this
function)
fs/unionfs/copyup.c:694: error: (Each undeclared identifier is reported only
once
CC: Jesse I Pollard <pollard@ccs.nrl.navy.mil>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Thu, 6 Dec 2007 23:46:46 +0000 (18:46 -0500)]
Unionfs ODF: release 2.1.10
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 2 Dec 2007 02:20:28 +0000 (21:20 -0500)]
Unionfs ODF: remove useless lookup message
No need to clutter the console with kernel messages which result from normal
behaviour.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 30 Nov 2007 22:32:14 +0000 (17:32 -0500)]
Unionfs ODF: show the odf= option in show_mounts
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 30 Nov 2007 22:31:17 +0000 (17:31 -0500)]
Unionfs ODF: save vfsmount and dentry (struct path) of /odf
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 2 Dec 2007 16:47:04 +0000 (11:47 -0500)]
Unionfs ODF: properly update parent dir times after rmdir/unlink
Comply with our time-based cache-coherency invariants: that the mtime of a
unionfs object is the max() of all lower ones.
Erez Zadok [Fri, 30 Nov 2007 19:17:34 +0000 (14:17 -0500)]
Unionfs ODF: prevent leaking /odf/* dentries
Upon cache coherency, also dput the odf.dentry.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 30 Nov 2007 02:24:53 +0000 (21:24 -0500)]
Unionfs ODF: minor coding style updates
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Thu, 29 Nov 2007 08:09:57 +0000 (03:09 -0500)]
Unionfs ODF: set the gid of /odf/ns to 0 on initial creation
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Thu, 29 Nov 2007 07:36:57 +0000 (02:36 -0500)]
Unionfs ODF: cleanup code in odf_create_hierarchy
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Thu, 29 Nov 2007 00:00:51 +0000 (19:00 -0500)]
Unionfs: call wait_on_page_writeback before clear_page_dirty_for_io
CC: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 25 Nov 2007 18:35:54 +0000 (13:35 -0500)]
Unionfs: use generic_file_aio_read/write
There's no apparent need to define our own aio_read/write methods.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 25 Nov 2007 18:34:04 +0000 (13:34 -0500)]
Unionfs: update our inode size correctly upon partial write
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 25 Nov 2007 19:51:56 +0000 (14:51 -0500)]
Unionfs: prevent multiple writers to lower_page
Without this patch, the LTP fs test "rwtest04" triggers a
BUG_ON(PageWriteback(page)) in fs/buffer.c:1706.
CC: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 25 Nov 2007 01:05:47 +0000 (20:05 -0500)]
Unionfs: support splice(2)
Also remove redundant variable from unionfs_readpage (saves a bit on stack
space).
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sat, 24 Nov 2007 21:43:36 +0000 (16:43 -0500)]
Unionfs: reintroduce a bmap method
This is needed for swapon(2) files in the union.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sat, 24 Nov 2007 21:03:14 +0000 (16:03 -0500)]
Unionfs: update times in setattr
Needed to maintain Unix semantics via utimes(2).
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Rachita Kothiyal [Tue, 27 Nov 2007 20:04:29 +0000 (15:04 -0500)]
Unionfs: Fix incorrect opaque dir detection in unionfs_do_rmdir
Fix unionfs_do_rmdir() to recognize opaque directories correctly
for creating whiteouts.
Signed-off-by: Rachita Kothiyal(rachita@fsl.cs.sunysb.edu)
Rachita Kothiyal [Mon, 26 Nov 2007 20:06:05 +0000 (15:06 -0500)]
Unionfs: release lower resources on successful rmdir: Missed
Rachita Kothiyal [Sun, 25 Nov 2007 22:55:36 +0000 (17:55 -0500)]
Unionfs: release lower resources on successful rmdir
This patch prevents those resources from lingering around until memory
pressure would have forced them out. The patch also properly handles
directories that have been rmdir'ed which are still some process's cwd.
CC: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Conflicts:
fs/unionfs/unlink.c
Rachita Kothiyal [Sun, 25 Nov 2007 22:47:31 +0000 (17:47 -0500)]
Unionfs: remove useless debugging messages
These are considered normal behaviour, they don't really reveal any insight
to the person debugging the code, and they tend to clutter console messages.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Wed, 21 Nov 2007 03:23:08 +0000 (22:23 -0500)]
Unionfs: set lower mnt after mkdir which resulted in copyup
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sat, 24 Nov 2007 07:09:28 +0000 (02:09 -0500)]
Unionfs: minor cleanup in the debugging infrastructure
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Hugh Dickins [Mon, 19 Nov 2007 01:26:05 +0000 (20:26 -0500)]
Unionfs: minor cleanup in writepage
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Thu, 22 Nov 2007 02:55:53 +0000 (21:55 -0500)]
Unionfs: cleaner support for RT patches
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Rachita Kothiyal [Thu, 22 Nov 2007 05:34:28 +0000 (00:34 -0500)]
Unionfs: Fix deadlock on unionfs superblock read/write semaphore.
Added missing unionfs_read_lock() on the superblock object.
Signed-off-by: Rachita Kothiyal(rachita@fsl.cs.sunysb.edu)
Rachita Kothiyal [Sun, 25 Nov 2007 21:28:45 +0000 (16:28 -0500)]
Unionfs: Fix an OOPs in whiteout lookup
Pass the dbstart of the parent and get the correct lower dentry of the
parent. We need the parent's lower dentry so that we can lookup the
child(whiteout) and find the child's lower dentry too.
Signed-off-by: Rachita Kothiyal(rachita@fsl.cs.sunysb.edu)
Rachita Kothiyal [Thu, 22 Nov 2007 05:12:34 +0000 (00:12 -0500)]
Unionfs: Avoid looking for a lower dentry for a negative dbstart.
Signed-off-by: Rachita Kothiyal (rachita@fsl.cs.sunysb.edu)
Erez Zadok [Mon, 19 Nov 2007 03:04:51 +0000 (22:04 -0500)]
Unionfs ODF: spell check strings and comments
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 19 Nov 2007 02:59:09 +0000 (21:59 -0500)]
Unionfs ODF: prefix all printk' strings with "unionfs: "
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 19 Nov 2007 02:46:07 +0000 (21:46 -0500)]
Unionfs ODF: create and pass lower_nd to vfs_create
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 19 Nov 2007 02:38:54 +0000 (21:38 -0500)]
Unionfs ODF: use kthread.h api, not calling kernel_thread directly
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 19 Nov 2007 02:48:00 +0000 (21:48 -0500)]
Unionfs ODF: coding standards
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Mon, 19 Nov 2007 01:27:01 +0000 (20:27 -0500)]
Unionfs: use f_path not f_dentry/f_mnt
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 18 Nov 2007 23:45:46 +0000 (18:45 -0500)]
patch unionfs-port-odf-to-2-6-24-rc2.patch
Erez Zadok [Sun, 18 Nov 2007 22:39:25 +0000 (17:39 -0500)]
Unionfs: release 2.1.9
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 16 Nov 2007 18:45:04 +0000 (13:45 -0500)]
Unionfs: move debugging checks inside locks
This is to ensure that the objects we want to check aren't being destroyed
or changed by another thread.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 16 Nov 2007 18:45:06 +0000 (13:45 -0500)]
Unionfs: fold do_readpage into unionfs_readpage
Simplify the code and reduce stack pressure a bit.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 16 Nov 2007 18:45:08 +0000 (13:45 -0500)]
Unionfs: remove unnecessary lower atime updates
No need for this because our readpage calls vfs_read on the lower objects,
which would update the atime as/if needed.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 16 Nov 2007 18:45:09 +0000 (13:45 -0500)]
Unionfs: debugging updates
Don't perform dentry+inode checks unless both are valid.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 16 Nov 2007 18:45:10 +0000 (13:45 -0500)]
Unionfs: clear partial read in readpage
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 16 Nov 2007 18:45:11 +0000 (13:45 -0500)]
Unionfs: writepage updates
Don't set/reset the PageUptodate flag on our page. Call flush_dcache_page
on the lower page after copy_highpage, and set it uptodate. Call
set_page_dirty right before clear_page_dirty_for_io.
CC: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 16 Nov 2007 18:45:12 +0000 (13:45 -0500)]
Unionfs: update cache-coherency detection heuristics
Use a small delay to reduce the number of times unionfs has to detect
changed mtime's/ctime's, and also reduce the potential for false positives.
See Documentation/filesystems/unionfs/concepts.txt for a detailed
discussion.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 18 Nov 2007 04:42:10 +0000 (23:42 -0500)]
Unionfs: use i_size wrappers
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 16 Nov 2007 18:45:14 +0000 (13:45 -0500)]
Unionfs: flush and release updates
Remove the totalopens counter which was intended to reduce unnecessary
processing of d_deleted dentries. Move that processing from file_release to
flush.
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 18 Nov 2007 22:39:25 +0000 (17:39 -0500)]
Unionfs: release 2.1.8
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 16 Nov 2007 18:45:16 +0000 (13:45 -0500)]
Unionfs/VFS: no need to export 2 symbols in security/security.c
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 18 Nov 2007 04:38:17 +0000 (23:38 -0500)]
Unionfs: don't printk an error if it's due to common copyup
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 16 Nov 2007 18:45:19 +0000 (13:45 -0500)]
Unionfs: don't bother validating inode if it has no lower branches
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 16 Nov 2007 18:45:20 +0000 (13:45 -0500)]
Unionfs: avoid a deadlock during branch-management on a pivot_root'ed union
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Acked-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Erez Zadok [Fri, 16 Nov 2007 18:45:21 +0000 (13:45 -0500)]
Unionfs: mmap updates
Rewrite unionfs_writepage to minimize dependence on AOP_WRITEPAGE_ACTIVEATE,
handle memory pressure better, and update documentation. Remove
unionfs_sync_page because it's not needed.
CC: Hugh Dickins <hugh@veritas.com>
CC: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 16 Nov 2007 18:45:23 +0000 (13:45 -0500)]
Unionfs: update usage.txt documention
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 16 Nov 2007 18:45:24 +0000 (13:45 -0500)]
Unionfs: cleanup permission checking code
Use vfs helpers and avoid redundant checks performed by the VFS already.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 18 Nov 2007 22:39:25 +0000 (17:39 -0500)]
Unionfs: release 2.1.7
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 18 Nov 2007 04:33:39 +0000 (23:33 -0500)]
Unionfs: remove obsolete #define and comment
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Jeff Layton [Fri, 16 Nov 2007 18:45:29 +0000 (13:45 -0500)]
Unionfs: fix unionfs_setattr to handle ATTR_KILL_S*ID
Don't allow unionfs_setattr to trip the BUG() in notify_change. Clear
ATTR_MODE if the either ATTR_KILL_S*ID is set. This also allows the
lower filesystem to interpret these bits in its own way.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Cc: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 16 Nov 2007 18:45:30 +0000 (13:45 -0500)]
Unionfs: remove for_writepages nfs workaround
This is no longer necessary since struct writeback_control no longer has a
fs_private field which lower file systems (esp. nfs) use. Plus, unionfs now
defines its own ->writepages method.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 16 Nov 2007 18:45:31 +0000 (13:45 -0500)]
Unionfs: convert a printk to pr_debug in release
This is mostly an informational message, not an error.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 16 Nov 2007 18:45:32 +0000 (13:45 -0500)]
Unionfs: don't bother validating dentry if it has no lower branches
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 16 Nov 2007 18:45:33 +0000 (13:45 -0500)]
Unionfs: don't printk trivial message upon normal rename-copyup
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 16 Nov 2007 18:45:34 +0000 (13:45 -0500)]
Unionfs: support lower filesystems without writeback capability
Implement unionfs_writepages. As per
mm/filemap.c:__filemap_fdatawrite_range(), don't call our writepage if the
lower mapping has BDI_CAP_NO_WRITEBACK capability set.
Signed-off-by: Pekka J Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Andrew Morton [Fri, 16 Nov 2007 18:45:35 +0000 (13:45 -0500)]
Unionfs: slab api remove useless ctor parameter and reorder parameters
fs/unionfs/super.c: In function 'unionfs_init_inode_cache':
fs/unionfs/super.c:874: warning: passing argument 5 of 'kmem_cache_create' from incompatible pointer type
Cc: Christoph Lameter <clameter@sgi.com>
Cc: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Andrew Morton [Fri, 16 Nov 2007 18:45:36 +0000 (13:45 -0500)]
Unionfs: security convert lsm into a static interface fix
ERROR: "security_inode_permission" [fs/unionfs/unionfs.ko] undefined!
ERROR: "security_file_ioctl" [fs/unionfs/unionfs.ko] undefined!
Need these back.
Cc: "Serge E. Hallyn" <serue@us.ibm.com>
Cc: Arjan van de Ven <arjan@infradead.org>
Cc: Chris Wright <chrisw@sous-sol.org>
Cc: James Morris <jmorris@namei.org>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 18 Nov 2007 22:39:25 +0000 (17:39 -0500)]
Unionfs: release 2.1.6
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 18 Nov 2007 20:07:27 +0000 (15:07 -0500)]
Unionfs: coding style: avoid lines longer than 80 chars
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 16 Nov 2007 18:45:38 +0000 (13:45 -0500)]
Unionfs: coding style: miscellaneous fixes
No braces around single-statement if's.
No externs in .c files.
use <linux/mman.h> not <asm/mman.h>.
Use (foo *) not (foo*).
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 16 Nov 2007 18:45:39 +0000 (13:45 -0500)]
Unionfs: coding style: avoid multiple assignments on same line
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 18 Nov 2007 04:32:04 +0000 (23:32 -0500)]
Unionfs: coding style: take assignments out of "if" conditions
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 16 Nov 2007 18:45:41 +0000 (13:45 -0500)]
Unionfs: coding style: proper spacing
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 18 Nov 2007 04:30:13 +0000 (23:30 -0500)]
Unionfs: use braces in both branches of conditionals
As per CodingStyle, if one branch of an if-then-else has braces because it
has multiple statements, then the other branch should have braces too, even
if the other branch has only one statement in it.
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 18 Nov 2007 04:27:52 +0000 (23:27 -0500)]
Unionfs: remove periods from the end of printk strings
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 18 Nov 2007 04:27:19 +0000 (23:27 -0500)]
Unionfs: update/assign a KERN_* level to all printk statements
Also use pr_info() instead of printk(KERN_INFO ...)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 16 Nov 2007 18:45:45 +0000 (13:45 -0500)]
Unionfs: add missing newlines in printk's
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 18 Nov 2007 21:38:45 +0000 (16:38 -0500)]
Unionfs: convert all appropriate printk's to pr_debug calls
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 16 Nov 2007 18:45:47 +0000 (13:45 -0500)]
Unionfs: use pr_debug() instead of custom dprintk()
Also turn on DEBUG if CONFIG_UNION_FS_DEBUG is on
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 16 Nov 2007 18:45:48 +0000 (13:45 -0500)]
Unionfs: use page_offset() helper
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Fri, 16 Nov 2007 18:45:49 +0000 (13:45 -0500)]
Unionfs: properly indent static struct
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 18 Nov 2007 04:12:13 +0000 (23:12 -0500)]
Unionfs: use UNIONFS_NAME macro
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Erez Zadok [Sun, 18 Nov 2007 04:11:00 +0000 (23:11 -0500)]
Unionfs: use consistent printk prefixes
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>