unionfs-2.6.9.y.git
18 years agoUnionfs: update times in setattr
Erez Zadok [Tue, 27 Nov 2007 00:53:45 +0000 (19:53 -0500)]
Unionfs: update times in setattr

Needed to maintain Unix semantics via utimes(2).

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: create opaque directories' whiteouts unconditionally
Erez Zadok [Tue, 27 Nov 2007 00:53:46 +0000 (19:53 -0500)]
Unionfs: create opaque directories' whiteouts unconditionally

Needed to maintain Unix semantics (LTP testing).

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: don't create whiteouts on rightmost branch
Erez Zadok [Tue, 27 Nov 2007 00:53:46 +0000 (19:53 -0500)]
Unionfs: don't create whiteouts on rightmost branch

If we are unlinking/rmdir'ing an object on the  rightmost branch, there's no
need to  create a whiteout there: this saves on storage space and inodes.
Also, in the (degenerate) case of having only one branch, this really saves
on whiteouts.

CC: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: release lower resources on successful rmdir
Erez Zadok [Tue, 27 Nov 2007 00:53:47 +0000 (19:53 -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>
18 years agoUnionfs: remove useless debugging messages
Erez Zadok [Tue, 27 Nov 2007 00:53:48 +0000 (19:53 -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>
18 years agoUnionfs: handle whiteouts more efficiently in filldir
Erez Zadok [Tue, 27 Nov 2007 00:53:49 +0000 (19:53 -0500)]
Unionfs: handle whiteouts more efficiently in filldir

If we cache a dirent for file "foo", and then it gets deleted, then we look
for a ".wh.foo" whiteout entry in the same dirent cache.  But our dirent
cache strips the ".wh." prefix, thus looking for an entry named "foo" whose
filldir_node->whiteout should be 1 instead of 0.  In that case, don't
display  an incorrect printk  message that the file system may be corrupt,
but set that filldir_node->whiteout to 1.

CC: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: set lower mnt after mkdir which resulted in copyup
Erez Zadok [Tue, 27 Nov 2007 00:53:50 +0000 (19:53 -0500)]
Unionfs: set lower mnt after mkdir which resulted in copyup

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: minor cleanup in the debugging infrastructure
Erez Zadok [Tue, 27 Nov 2007 00:53:51 +0000 (19:53 -0500)]
Unionfs: minor cleanup in the debugging infrastructure

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: minor coding standards applied
Erez Zadok [Tue, 27 Nov 2007 00:53:52 +0000 (19:53 -0500)]
Unionfs: minor coding standards applied

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: minor cleanup in writepage
Hugh Dickins [Tue, 27 Nov 2007 00:53:53 +0000 (19:53 -0500)]
Unionfs: minor cleanup in writepage

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: cleaner support for RT patches
Erez Zadok [Tue, 27 Nov 2007 00:53:54 +0000 (19:53 -0500)]
Unionfs: cleaner support for RT patches

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: release 2.1.9 unionfs-2.1.9
Erez Zadok [Tue, 27 Nov 2007 00:53:55 +0000 (19:53 -0500)]
Unionfs: release 2.1.9

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: move debugging checks inside locks
Erez Zadok [Tue, 27 Nov 2007 00:53:55 +0000 (19:53 -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>
18 years agoUnionfs: fold do_readpage into unionfs_readpage
Erez Zadok [Tue, 27 Nov 2007 00:53:56 +0000 (19:53 -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>
18 years agoUnionfs: remove unnecessary lower atime updates
Erez Zadok [Tue, 27 Nov 2007 00:53:57 +0000 (19:53 -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>
18 years agoUnionfs: debugging updates
Erez Zadok [Tue, 27 Nov 2007 00:53:58 +0000 (19:53 -0500)]
Unionfs: debugging updates

Don't perform dentry+inode checks unless both are valid.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: clear partial read in readpage
Erez Zadok [Tue, 27 Nov 2007 00:53:59 +0000 (19:53 -0500)]
Unionfs: clear partial read in readpage

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: writepage updates
Erez Zadok [Tue, 27 Nov 2007 00:54:00 +0000 (19:54 -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>
18 years agoUnionfs: update cache-coherency detection heuristics
Erez Zadok [Tue, 27 Nov 2007 00:54:01 +0000 (19:54 -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>
18 years agoUnionfs: use i_size wrappers
Erez Zadok [Tue, 27 Nov 2007 00:54:02 +0000 (19:54 -0500)]
Unionfs: use i_size wrappers

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: flush and release updates
Erez Zadok [Tue, 27 Nov 2007 00:54:02 +0000 (19:54 -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>
18 years agoUnionfs: release 2.1.8 unionfs-2.1.8
Erez Zadok [Tue, 27 Nov 2007 00:54:03 +0000 (19:54 -0500)]
Unionfs: release 2.1.8

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: don't printk an error if it's due to common copyup
Erez Zadok [Tue, 27 Nov 2007 00:54:04 +0000 (19:54 -0500)]
Unionfs: don't printk an error if it's due to common copyup

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: don't bother validating inode if it has no lower branches
Erez Zadok [Tue, 27 Nov 2007 00:54:05 +0000 (19:54 -0500)]
Unionfs: don't bother validating inode if it has no lower branches

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: avoid a deadlock during branch-management on a pivot_root'ed union
Erez Zadok [Tue, 27 Nov 2007 00:54:06 +0000 (19:54 -0500)]
Unionfs: avoid a deadlock during branch-management on a pivot_root'ed union

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: mmap updates
Erez Zadok [Tue, 27 Nov 2007 00:54:07 +0000 (19:54 -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>
18 years agoUnionfs: update usage.txt documention
Erez Zadok [Tue, 27 Nov 2007 00:54:08 +0000 (19:54 -0500)]
Unionfs: update usage.txt documention

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: cleanup permission checking code
Erez Zadok [Tue, 27 Nov 2007 00:54:08 +0000 (19:54 -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>
18 years agoUnionfs: delete whiteouts in sticky directories
Erez Zadok [Tue, 27 Nov 2007 00:54:09 +0000 (19:54 -0500)]
Unionfs: delete whiteouts in sticky directories

This is needed to maintain Unix semantics.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: update mmap documentation for unionfs_writepage
Erez Zadok [Tue, 27 Nov 2007 00:54:10 +0000 (19:54 -0500)]
Unionfs: update mmap documentation for unionfs_writepage

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: release 2.1.7 unionfs-2.1.7
Erez Zadok [Tue, 27 Nov 2007 00:54:11 +0000 (19:54 -0500)]
Unionfs: release 2.1.7

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: remove obsolete #define and comment
Erez Zadok [Tue, 27 Nov 2007 00:54:12 +0000 (19:54 -0500)]
Unionfs: remove obsolete #define and comment

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: convert a printk to pr_debug in release
Erez Zadok [Tue, 27 Nov 2007 00:54:13 +0000 (19:54 -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>
18 years agoUnionfs: don't bother validating dentry if it has no lower branches
Erez Zadok [Tue, 27 Nov 2007 00:54:14 +0000 (19:54 -0500)]
Unionfs: don't bother validating dentry if it has no lower branches

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: don't printk trivial message upon normal rename-copyup
Erez Zadok [Tue, 27 Nov 2007 00:54:14 +0000 (19:54 -0500)]
Unionfs: don't printk trivial message upon normal rename-copyup

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: support lower filesystems without writeback capability
Erez Zadok [Tue, 27 Nov 2007 00:54:16 +0000 (19:54 -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>
18 years agoUnionfs: release 2.1.6 unionfs-2.1.6
Erez Zadok [Tue, 27 Nov 2007 00:54:17 +0000 (19:54 -0500)]
Unionfs: release 2.1.6

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: fix bug when renaming directories on top of nfs2/3
Erez Zadok [Tue, 27 Nov 2007 00:54:17 +0000 (19:54 -0500)]
Unionfs: fix bug when renaming directories on top of nfs2/3

In 2.6.9, nfs2/3 cannot rename one dir to another, if the target dir exists:
an EBUSY is returned.  So if we get that, we have to purge the lower inode
and retry.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: coding style: avoid lines longer than 80 chars
Erez Zadok [Tue, 27 Nov 2007 00:54:18 +0000 (19:54 -0500)]
Unionfs: coding style: avoid lines longer than 80 chars

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: coding style: miscellaneous fixes
Erez Zadok [Tue, 27 Nov 2007 00:54:19 +0000 (19:54 -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>
18 years agoUnionfs: coding style: avoid multiple assignments on same line
Erez Zadok [Tue, 27 Nov 2007 00:54:20 +0000 (19:54 -0500)]
Unionfs: coding style: avoid multiple assignments on same line

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: coding style: take assignments out of "if" conditions
Erez Zadok [Tue, 27 Nov 2007 00:54:21 +0000 (19:54 -0500)]
Unionfs: coding style: take assignments out of "if" conditions

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: coding style: proper spacing
Erez Zadok [Tue, 27 Nov 2007 00:54:22 +0000 (19:54 -0500)]
Unionfs: coding style: proper spacing

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: use braces in both branches of conditionals
Erez Zadok [Tue, 27 Nov 2007 00:54:22 +0000 (19:54 -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>
18 years agoUnionfs: remove periods from the end of printk strings
Erez Zadok [Tue, 27 Nov 2007 00:54:23 +0000 (19:54 -0500)]
Unionfs: remove periods from the end of printk strings

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: update/assign a KERN_* level to all printk statements
Erez Zadok [Tue, 27 Nov 2007 00:54:24 +0000 (19:54 -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>
18 years agoUnionfs: add missing newlines in printk's
Erez Zadok [Tue, 27 Nov 2007 00:54:26 +0000 (19:54 -0500)]
Unionfs: add missing newlines in printk's

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: convert all appropriate printk's to pr_debug calls
Erez Zadok [Tue, 27 Nov 2007 00:54:27 +0000 (19:54 -0500)]
Unionfs: convert all appropriate printk's to pr_debug calls

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: use pr_debug() instead of custom dprintk()
Erez Zadok [Tue, 27 Nov 2007 00:54:28 +0000 (19:54 -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>
18 years agoUnionfs: use page_offset() helper
Erez Zadok [Tue, 27 Nov 2007 00:54:29 +0000 (19:54 -0500)]
Unionfs: use page_offset() helper

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: remove unnecessary if condition
Erez Zadok [Tue, 27 Nov 2007 00:54:29 +0000 (19:54 -0500)]
Unionfs: remove unnecessary if condition

The condition is always true there.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: properly indent static struct
Erez Zadok [Tue, 27 Nov 2007 00:54:30 +0000 (19:54 -0500)]
Unionfs: properly indent static struct

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: use UNIONFS_NAME macro
Erez Zadok [Tue, 27 Nov 2007 00:54:31 +0000 (19:54 -0500)]
Unionfs: use UNIONFS_NAME macro

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: use consistent printk prefixes
Erez Zadok [Tue, 27 Nov 2007 00:54:32 +0000 (19:54 -0500)]
Unionfs: use consistent printk prefixes

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: minor comment cleanups
Erez Zadok [Tue, 27 Nov 2007 00:54:33 +0000 (19:54 -0500)]
Unionfs: minor comment cleanups

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: compile if debug is off
Erez Zadok [Tue, 27 Nov 2007 00:54:34 +0000 (19:54 -0500)]
Unionfs: compile if debug is off

Signed-of-by: John Johansen <jjohansen@suse.de>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agopatch unionfs_undo_unnecessary_unlikely_calls
Erez Zadok [Tue, 27 Nov 2007 00:54:35 +0000 (19:54 -0500)]
patch unionfs_undo_unnecessary_unlikely_calls

18 years agoUnionfs: display informational messages only if debug is on
Erez Zadok [Tue, 27 Nov 2007 00:54:36 +0000 (19:54 -0500)]
Unionfs: display informational messages only if debug is on

This is to avoid filling the console/logs with messages that are primarily
of debugging use.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Acked-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
18 years agoUnionfs: release 2.1.5 unionfs-2.1.5
Erez Zadok [Tue, 27 Nov 2007 00:54:36 +0000 (19:54 -0500)]
Unionfs: release 2.1.5

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: use poison.h for safe poison pointers
Erez Zadok [Tue, 27 Nov 2007 00:54:37 +0000 (19:54 -0500)]
Unionfs: use poison.h for safe poison pointers

This also fixes a compile warning on 64-bit systems.

Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: add un/likely conditionals on xattr ops
Erez Zadok [Tue, 27 Nov 2007 00:54:38 +0000 (19:54 -0500)]
Unionfs: add un/likely conditionals on xattr ops

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: add un/likely conditionals on unlink ops
Erez Zadok [Tue, 27 Nov 2007 00:54:39 +0000 (19:54 -0500)]
Unionfs: add un/likely conditionals on unlink ops

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: add un/likely conditionals on common subr
Erez Zadok [Tue, 27 Nov 2007 00:54:40 +0000 (19:54 -0500)]
Unionfs: add un/likely conditionals on common subr

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: add un/likely conditionals on readdir ops
Erez Zadok [Tue, 27 Nov 2007 00:54:41 +0000 (19:54 -0500)]
Unionfs: add un/likely conditionals on readdir ops

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: add un/likely conditionals on rename ops
Erez Zadok [Tue, 27 Nov 2007 00:54:42 +0000 (19:54 -0500)]
Unionfs: add un/likely conditionals on rename ops

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: add un/likely conditionals on mmap ops
Erez Zadok [Tue, 27 Nov 2007 00:54:42 +0000 (19:54 -0500)]
Unionfs: add un/likely conditionals on mmap ops

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: add un/likely conditionals on super ops
Erez Zadok [Tue, 27 Nov 2007 00:54:43 +0000 (19:54 -0500)]
Unionfs: add un/likely conditionals on super ops

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: add un/likely conditionals on lookup ops
Erez Zadok [Tue, 27 Nov 2007 00:54:44 +0000 (19:54 -0500)]
Unionfs: add un/likely conditionals on lookup ops

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: add un/likely conditionals on inode ops
Erez Zadok [Tue, 27 Nov 2007 00:54:45 +0000 (19:54 -0500)]
Unionfs: add un/likely conditionals on inode ops

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: add un/likely conditionals on fileops
Erez Zadok [Tue, 27 Nov 2007 00:54:46 +0000 (19:54 -0500)]
Unionfs: add un/likely conditionals on fileops

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: add un/likely conditionals on headers
Erez Zadok [Tue, 27 Nov 2007 00:54:46 +0000 (19:54 -0500)]
Unionfs: add un/likely conditionals on headers

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: add un/likely conditionals on dir ops
Erez Zadok [Tue, 27 Nov 2007 00:54:47 +0000 (19:54 -0500)]
Unionfs: add un/likely conditionals on dir ops

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: add un/likely conditionals on dentry ops
Erez Zadok [Tue, 27 Nov 2007 00:54:48 +0000 (19:54 -0500)]
Unionfs: add un/likely conditionals on dentry ops

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: add un/likely conditionals on debug ops
Erez Zadok [Tue, 27 Nov 2007 00:54:49 +0000 (19:54 -0500)]
Unionfs: add un/likely conditionals on debug ops

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: add un/likely conditionals on copyup ops
Erez Zadok [Tue, 27 Nov 2007 00:54:50 +0000 (19:54 -0500)]
Unionfs: add un/likely conditionals on copyup ops

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: add un/likely conditionals on common fileops
Erez Zadok [Tue, 27 Nov 2007 00:54:51 +0000 (19:54 -0500)]
Unionfs: add un/likely conditionals on common fileops

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: minor coding style updates
Erez Zadok [Tue, 27 Nov 2007 00:54:52 +0000 (19:54 -0500)]
Unionfs: minor coding style updates

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: cast page->index loff_t before shifting
Erez Zadok [Tue, 27 Nov 2007 00:54:52 +0000 (19:54 -0500)]
Unionfs: cast page->index loff_t before shifting

Fixes bugs in number promotion/demotion computation, as per
<http://lkml.org/lkml/2007/9/20/17>

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: release 2.1.4 unionfs-2.1.4
Erez_Zadok [Tue, 27 Nov 2007 00:54:54 +0000 (19:54 -0500)]
Unionfs: release 2.1.4

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: cache-coherency fixes
Erez_Zadok [Tue, 27 Nov 2007 00:54:54 +0000 (19:54 -0500)]
Unionfs: cache-coherency fixes

Do not update mtime if there is no upper branch for the inode.  This
prevents from calling unionfs_lower_inode_idx() with a negative index, which
triggers a bug.

Signed-off-by: Olivier Blin <blino@mandriva.com>
Acked-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: display informational messages only if debug is on
Erez_Zadok [Tue, 27 Nov 2007 00:54:55 +0000 (19:54 -0500)]
Unionfs: display informational messages only if debug is on

This is to avoid filling the console/logs with messages that are primarily
of debugging use.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: use int in unionfs_d_revalidate
Erez_Zadok [Tue, 27 Nov 2007 00:54:56 +0000 (19:54 -0500)]
Unionfs: use int in unionfs_d_revalidate

We have to use an int, even though unionfs_d_revalidate calls other routines
that return only true/false, b/c ->d_revalidate is allowed to return a
negative errno number.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: documentation updates/corrections
Erez_Zadok [Tue, 27 Nov 2007 00:54:57 +0000 (19:54 -0500)]
Unionfs: documentation updates/corrections

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: release 2.1.3 unionfs-2.1.3
Erez_Zadok [Tue, 27 Nov 2007 00:54:58 +0000 (19:54 -0500)]
Unionfs: release 2.1.3

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: cache coherency after lower objects are removed
Erez_Zadok [Tue, 27 Nov 2007 00:54:59 +0000 (19:54 -0500)]
Unionfs: cache coherency after lower objects are removed

Prevent an oops if a lower file is deleted and then it is stat'ed from the
upper layer.  Ensure that we return a negative dentry so the user will get
an ENOENT.  Properly dput/mntput so we don't leak references at the lower
file system.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: unionfs_lookup locking consistency
Erez_Zadok [Tue, 27 Nov 2007 00:55:00 +0000 (19:55 -0500)]
Unionfs: unionfs_lookup locking consistency

Ensure that our lookup locking is consistent and symmetric: if a lock
existed before calling lookup_backend, it should remain so; only if
performing a lookup of a known new dentry, should lookup_backend return a
newly-locked dentry-inode info (and only if there was no error).  Document
this behavior.  This cleanup allowed us to remove two unnecessary int
declarations.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: use boolean type in unionfs_d_revalidate
Erez_Zadok [Tue, 27 Nov 2007 00:55:00 +0000 (19:55 -0500)]
Unionfs: use boolean type in unionfs_d_revalidate

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: add missing newlines to printks
Erez_Zadok [Tue, 27 Nov 2007 00:55:01 +0000 (19:55 -0500)]
Unionfs: add missing newlines to printks

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: compatible boolean type
Erez_Zadok [Tue, 27 Nov 2007 00:55:02 +0000 (19:55 -0500)]
Unionfs: compatible boolean type

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: remove unnecessary comment
Erez_Zadok [Tue, 27 Nov 2007 00:55:03 +0000 (19:55 -0500)]
Unionfs: remove unnecessary comment

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: documentation updates
Erez_Zadok [Tue, 27 Nov 2007 00:55:04 +0000 (19:55 -0500)]
Unionfs: documentation updates

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: use bool type in dentry and file revalidation code
Erez_Zadok [Tue, 27 Nov 2007 00:55:05 +0000 (19:55 -0500)]
Unionfs: use bool type in dentry and file revalidation code

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Conflicts:

fs/unionfs/file.c
fs/unionfs/mmap.c

18 years agoUnionfs: cache-coherency fix for is_newer_lower
Erez_Zadok [Tue, 27 Nov 2007 00:55:05 +0000 (19:55 -0500)]
Unionfs: cache-coherency fix for is_newer_lower

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: import Jeff's fixes from korg
Erez_Zadok [Tue, 27 Nov 2007 00:55:06 +0000 (19:55 -0500)]
Unionfs: import Jeff's fixes from korg

64 bit fixes for debugging support.
Use bool type where appropriate.
Minor code cleanups.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
18 years agoUnionfs: Remove unused #defines
Josef 'Jeff' Sipek [Tue, 27 Nov 2007 00:55:07 +0000 (19:55 -0500)]
Unionfs: Remove unused #defines

Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
18 years agoUnionfs: Simplify unionfs_get_nlinks
Josef 'Jeff' Sipek [Tue, 27 Nov 2007 00:55:08 +0000 (19:55 -0500)]
Unionfs: Simplify unionfs_get_nlinks

Since we set the right value for d_type in readdir, there's really no point
in having to calculate the number of directory links. Some on-disk
filesystems don't even store the number of links for directories.

Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
18 years agoUnionfs: unionfs_create rewrite
Josef 'Jeff' Sipek [Tue, 27 Nov 2007 00:55:09 +0000 (19:55 -0500)]
Unionfs: unionfs_create rewrite

The code was hard to follow and violated some invariants (e.g., never modify
a read only branch, and always create on branch 0).

Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
18 years agoUnionfs: document lockdep issues
Erez_Zadok [Tue, 27 Nov 2007 00:55:10 +0000 (19:55 -0500)]
Unionfs: document lockdep issues

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: support CONFIG_PREEMPT_RT
Erez_Zadok [Tue, 27 Nov 2007 00:55:11 +0000 (19:55 -0500)]
Unionfs: support CONFIG_PREEMPT_RT

Use compat_rw_semaphore when using the real-time preemption patches.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
18 years agoUnionfs: release 2.1.2 unionfs-2.1.2
Erez_Zadok [Tue, 27 Nov 2007 00:55:12 +0000 (19:55 -0500)]
Unionfs: release 2.1.2

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>