unionfs-odf.git
17 years agoUnionfs: core cache-coherency code
Erez_Zadok [Fri, 16 Nov 2007 18:56:13 +0000 (13:56 -0500)]
Unionfs: core cache-coherency code

This represents the core of the cache-coherency code, the code which
maintains time-based invariants; the lower objects should never be newer
than the upper Unionfs objects.  If they are newer, then it means that a
user has modified the lower Unionfs branches directly.  If so, then we have
to revalidate our objects by rebuilding them, and possibly discard any stale
data or meta-data.  See Documentation/filesystems/unionfs/concepts.txt under
the "Cache Coherency" section for more details of this design and
implementation.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agoUnionfs: introduce two functions to maintain time invariants
Erez_Zadok [Fri, 16 Nov 2007 18:47:27 +0000 (13:47 -0500)]
Unionfs: introduce two functions to maintain time invariants

A new function unionfs_copy_attr_times to maintain the inode time invariants
as per the Unionfs design (i.e., lower times should never be newer than our
times), as documented in Documentation/filesystems/unionfs/concepts.txt.
The second function, unionfs_copy_attr_all, is the unionfs-specific function
to copy all attributes: it uses the special Unionfs handling of hard-links
(via unionfs_get_nlinks) and it uses the special a/c/mtime handling (via
unionfs_copy_attr_times).  This second function is the special
fanout-version of fsstack_copy_attr_all, which was simplified for
linear-stack stackable file systems.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agoUnionfs: prototype and location change for unionfs_get_nlinks
Erez_Zadok [Fri, 16 Nov 2007 18:47:28 +0000 (13:47 -0500)]
Unionfs: prototype and location change for unionfs_get_nlinks

Change prototype of unionfs_get_nlinks to take a const inode.  Also move
extern for unionfs_get_nlinks so it can be refereed to in other Unionfs
header files.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agoecryptfs: update to new API of fsstack_copy_attr_all
Erez_Zadok [Fri, 16 Nov 2007 18:47:29 +0000 (13:47 -0500)]
ecryptfs: update to new API of fsstack_copy_attr_all

Remove obsolete third argument to fsstack_copy_attr_all which was always
NULL for ecryptfs.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agofs_stack: simplify generic attribute-copying function
Erez_Zadok [Fri, 16 Nov 2007 18:47:30 +0000 (13:47 -0500)]
fs_stack: simplify generic attribute-copying function

Remove special get_nlinks callback from fsstack_copy_attr_all, because the
callback was only used by Unionfs (and always used by Unionfs).  Unionfs now
needs a more complex version of fsstack_copy_attr_all, with two callbacks:
therefore it's easier to simplify this method for simple linear-stacking
stackable file system, and introduce a more complex fan-out version of it
for Unionfs.

This is an API change which requires that every stackable file system in the
kernel be updated to reflect that (currently only eCryptfs).

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agoUnionfs: m/c/atime invariant checking debugging code
Erez_Zadok [Fri, 16 Nov 2007 18:47:31 +0000 (13:47 -0500)]
Unionfs: m/c/atime invariant checking debugging code

Add checks to verify that lower inode times are not newer than our own inode
times.  Introduce two useful utility debugging functions to print inode
times.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agoUnionfs: bugfix in debugging infrastructure
Erez_Zadok [Fri, 16 Nov 2007 18:47:32 +0000 (13:47 -0500)]
Unionfs: bugfix in debugging infrastructure

Off-by-one bug fixed in range checking for lower directories.
Ensure that we PRINT_CALLER before an additional debug message.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agoCache coherency: resync unionfs data/meta-data when lower files change
Erez_Zadok [Fri, 16 Nov 2007 18:49:15 +0000 (13:49 -0500)]
Cache coherency: resync unionfs data/meta-data when lower files change

Whenever we revalidate a file or dentry, we check to see if any of the lower
inodes have changed (new mtime/ctime).  If so, we revalidate the upper
unionfs objects.  This method "works" in that as long as a user process will
have caused unionfs to be called, directly or indirectly, even to just do
->d_revalidate, then we will have purged the current unionfs data and the
process will see the new data.  For example, a process that continually
re-reads the same file's data will see the NEW data as soon as the lower
file had changed, upon the next read(2) syscall.  This also works for
meta-data changes which change the ctime (chmod, chown, chgrp, etc).

However, this doesn't work when the process re-reads the file's data via
mmap and the data was already read before via mmap: once we respond to
->readpage(s), then the kernel maps the page into the process's address
space and there doesn't appear to be a way to force the kernel to invalidate
those pages/mappings, and force the process to re-issue ->readpage.  Note:
only pages that have already been readpage'ed are not updated; any other
pages which unionfs's ->readpage would be called on, WILL get the updated
data.  If there's a way to invalidate active mappings and force a
->readpage, let us know please (invalidate_inode_pages2 doesn't do the
trick).

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agodocumentation: expand comment to explain precise semantics of new_dentry_private_data
Erez_Zadok [Mon, 11 Jun 2007 14:46:41 +0000 (10:46 -0400)]
documentation: expand comment to explain precise semantics of new_dentry_private_data

17 years agoRevert "cleanup: rewrite new_dentry_private data more simply"
Erez_Zadok [Mon, 11 Jun 2007 14:42:28 +0000 (10:42 -0400)]
Revert "cleanup: rewrite new_dentry_private data more simply"

This reverts commit db78098f66e2465195e33001788f0981ef788f3a.

17 years agocleanup: convert all instances of "hidden" to "lower".
Erez_Zadok [Sun, 10 Jun 2007 23:04:28 +0000 (19:04 -0400)]
cleanup: convert all instances of "hidden" to "lower".

The unionfs code contained many references to symbols whose name had the
string "hidden" in it, referring to, for example, a "hidden inode" below the
unionfs inode.  The term "hidden" was there for historical reasons and was a
misnomer, implying that the objects at unionfs's lower branches were somehow
hidden or unavailable.  This was not just incorrect, but confusing.  The
lower objects are just that: lower.  They are not hidden from users.  In
fact, users can 'cd' to lower branches and manipulate files directly there.
This long patch renames all such mis-named symbols, and re-indents the code
as needed to comply with coding standards.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agoFix section marker in header file:
Erez_Zadok [Sun, 10 Jun 2007 21:55:23 +0000 (17:55 -0400)]
Fix section marker in header file:

WARNING: fs/unionfs/unionfs.o(.init.text+0x56): Section mismatch: reference to .exit.text:stop_sioq (between 'init_module' and 'init_sioq')

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agocleanup: rewrite new_dentry_private data more simply
Erez_Zadok [Sun, 10 Jun 2007 21:45:53 +0000 (17:45 -0400)]
cleanup: rewrite new_dentry_private data more simply

Also remove unnecessary variables and statements.

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

fs/unionfs/lookup.c

17 years agobugfix: properly reset lower inode start/end range
Erez_Zadok [Wed, 6 Jun 2007 01:58:07 +0000 (21:58 -0400)]
bugfix: properly reset lower inode start/end range

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agobugfix: remove extra superblock rwsem unlock call
Erez_Zadok [Sun, 3 Jun 2007 06:26:36 +0000 (02:26 -0400)]
bugfix: remove extra superblock rwsem unlock call

This also makes the code more symmetric: the same code which locks also
unlocks the rwsem.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agolower-case text after "unionfs:" in printk's
Erez_Zadok [Fri, 1 Jun 2007 04:05:01 +0000 (00:05 -0400)]
lower-case text after "unionfs:" in printk's

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agoplace '}' of previous code block together with "else {"
Erez_Zadok [Fri, 1 Jun 2007 04:03:15 +0000 (00:03 -0400)]
place '}' of previous code block together with "else {"

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agoput '}' of code block on same line as "else {"
Erez_Zadok [Fri, 1 Jun 2007 04:00:05 +0000 (00:00 -0400)]
put '}' of code block on same line as "else {"

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agoplace two spaces after a sentence-ending period in long comments
Erez_Zadok [Fri, 1 Jun 2007 03:57:14 +0000 (23:57 -0400)]
place two spaces after a sentence-ending period in long comments

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agoproperly format multi-line comments
Erez_Zadok [Fri, 1 Jun 2007 03:51:01 +0000 (23:51 -0400)]
properly format multi-line comments

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agocleanup: ensure that all comment markers have spaces inside
Erez_Zadok [Fri, 1 Jun 2007 03:40:19 +0000 (23:40 -0400)]
cleanup: ensure that all comment markers have spaces inside

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agoreformat all lines longer than 80 characters
Erez_Zadok [Fri, 1 Jun 2007 03:34:56 +0000 (23:34 -0400)]
reformat all lines longer than 80 characters

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agodebugging: indent code properly and cleanups
Erez_Zadok [Fri, 1 Jun 2007 03:13:16 +0000 (23:13 -0400)]
debugging: indent code properly and cleanups

Also make PRINT_CALLER look like a function.
Fix one small bug in __show_branch_counts.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agoproperly indent all code
Erez_Zadok [Fri, 1 Jun 2007 02:58:26 +0000 (22:58 -0400)]
properly indent all code

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agocleanup: reformat all lines longer than 80 characters
Erez_Zadok [Fri, 1 Jun 2007 02:32:08 +0000 (22:32 -0400)]
cleanup: reformat all lines longer than 80 characters

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agospell check all strings and comments
Erez_Zadok [Thu, 31 May 2007 19:53:19 +0000 (15:53 -0400)]
spell check all strings and comments

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agocleanup: ensure every file has up-to-date copyright
Erez_Zadok [Thu, 31 May 2007 19:33:56 +0000 (15:33 -0400)]
cleanup: ensure every file has up-to-date copyright

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agocleanup: ensure proper comment on every "#endif"
Erez_Zadok [Thu, 31 May 2007 19:30:51 +0000 (15:30 -0400)]
cleanup: ensure proper comment on every "#endif"

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agocleanup: change "char* foo" declarations to "char *foo" consistently.
Erez_Zadok [Thu, 31 May 2007 19:23:29 +0000 (15:23 -0400)]
cleanup: change "char* foo" declarations to "char *foo" consistently.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agocleanup: ensure that all #endif/#else have an appropriate comment
Erez_Zadok [Thu, 31 May 2007 19:11:07 +0000 (15:11 -0400)]
cleanup: ensure that all #endif/#else have an appropriate comment

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agoextern all functions in odf.h
Yiannis Pericleous [Thu, 31 May 2007 01:07:19 +0000 (21:07 -0400)]
extern all functions in odf.h

17 years agobugfix: ensure dentry/inode/mnt validity after a successful ioctl
Erez_Zadok [Thu, 31 May 2007 00:14:07 +0000 (20:14 -0400)]
bugfix: ensure dentry/inode/mnt validity after a successful ioctl

We call unionfs_partial_lookup in our queryfile ioctl method, so we can find
all instances of a lower object to report back to a suer.  This can violate
the fanout invariants (e.g., a regular file should have only one lower
object active at a time).  So we have to re-establish the invariants on the
lower dentries, inodes, and mnts.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agobugfix: release superblock lock at end of ioctl method
Erez_Zadok [Thu, 31 May 2007 00:09:07 +0000 (20:09 -0400)]
bugfix: release superblock lock at end of ioctl method

Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agobug fixes: revalidate dentries passed to all inode/super operations
Yiannis Pericleous [Thu, 31 May 2007 00:41:07 +0000 (20:41 -0400)]
bug fixes: revalidate dentries passed to all inode/super operations

Be sure to properly revalidate all dentry chains passed to all inode and
super_block operations.  Remove the older BUG_ON test is_valid_dentry().
This should help improve cache-coherency.

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

fs/unionfs/inode.c
fs/unionfs/union.h
fs/unionfs/unlink.c

17 years agocode consistency: ensure that every #endif has a matching comment
Erez_Zadok [Wed, 30 May 2007 02:09:59 +0000 (22:09 -0400)]
code consistency: ensure that every #endif has a matching comment

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agocleanup: removed trailing whitespace
Yiannis Pericleous [Wed, 30 May 2007 23:56:57 +0000 (19:56 -0400)]
cleanup: removed trailing whitespace

17 years agoadded missing copyrights
Yiannis Pericleous [Wed, 30 May 2007 23:54:18 +0000 (19:54 -0400)]
added missing copyrights

17 years agoexport: bugfix, oopsing in d_revalidate when client gets ESTALE
Yiannis Pericleous [Wed, 30 May 2007 23:49:25 +0000 (19:49 -0400)]
export: bugfix, oopsing in d_revalidate when client gets ESTALE

with nfs exporting, when the cache is dropped on the server decode_fh will
most likely return ESTALE to the client. On such cases the server can get
a disconnected dentry in unionfs_open and a connected dentry in d_revalidate
but with ibstart to -1. This fix just detects those cases and returns an err
in order to stop the oopsing. However the file becomes unusable in the client,
any attempt to read it will return ESTALE. The best way to fix this will
be to implement decode_fh and make sure invariants are kept when an inode
becomes stale

17 years agobugfix: nullify kfreed pointer so it doesn't get double freed
Yiannis Pericleous [Wed, 30 May 2007 23:20:55 +0000 (19:20 -0400)]
bugfix: nullify kfreed pointer so it doesn't get double freed

17 years agoonly free odf in unionfs_read_super after odf_put_super succeeds
Yiannis Pericleous [Wed, 30 May 2007 23:18:45 +0000 (19:18 -0400)]
only free odf in unionfs_read_super after odf_put_super succeeds

17 years agocall inherint_mnt on parent after calls to create_parent, since
Yiannis Pericleous [Wed, 30 May 2007 20:36:31 +0000 (16:36 -0400)]
call inherint_mnt on parent after calls to create_parent, since

the newly created dentry might have a lower mnt on the leftmost
branch so inherint_mnt on that dentry will not inherit the mnt to
its parents

17 years agoRevert "Unionfs: Cleanup locking in new_dentry_private_data"
Yiannis Pericleous [Wed, 30 May 2007 20:34:30 +0000 (16:34 -0400)]
Revert "Unionfs: Cleanup locking in new_dentry_private_data"

This reverts commit a48f757714d7e70878461c5393de787e1497a612.

Conflicts:

fs/unionfs/lookup.c

17 years agoremoved super_block * from odf_get_opaque args
Yiannis Pericleous [Wed, 30 May 2007 19:51:27 +0000 (15:51 -0400)]
removed super_block * from odf_get_opaque args

17 years agoDocumentation: replace "odfforce" with "odf_keepcache"
Yiannis Pericleous [Wed, 30 May 2007 19:45:54 +0000 (15:45 -0400)]
Documentation: replace "odfforce" with "odf_keepcache"

17 years agolookup only up to opaque branch if looking up an opaque dir
Yiannis Pericleous [Wed, 30 May 2007 19:43:20 +0000 (15:43 -0400)]
lookup only up to opaque branch if looking up an opaque dir

17 years agobugfix: dont move to /odf/sr if same inode number is already there
Yiannis Pericleous [Wed, 30 May 2007 18:37:10 +0000 (14:37 -0400)]
bugfix: dont move to /odf/sr if same inode number is already there

17 years agoodf_remove bug, check if unionfs dentry is not negative before trying to
Yiannis Pericleous [Wed, 30 May 2007 17:27:10 +0000 (13:27 -0400)]
odf_remove bug, check if unionfs dentry is not negative before trying to

read its i_count

17 years agochanged the format string of inode nums to filenames to %lx
Yiannis Pericleous [Wed, 30 May 2007 17:18:25 +0000 (13:18 -0400)]
changed the format string of inode nums to filenames to %lx

17 years agosplit odf.h into two .h files, odf.h and odf_internals.h
Yiannis Pericleous [Wed, 30 May 2007 02:14:30 +0000 (22:14 -0400)]
split odf.h into two .h files, odf.h and odf_internals.h

17 years agorenamed dentry stack functions
Yiannis Pericleous [Wed, 30 May 2007 01:58:03 +0000 (21:58 -0400)]
renamed dentry stack functions

17 years agoadded comment for odf_dentry_info struct
Yiannis Pericleous [Wed, 30 May 2007 01:54:02 +0000 (21:54 -0400)]
added comment for odf_dentry_info struct

17 years agoadded a few FIXME comments
Yiannis Pericleous [Wed, 30 May 2007 01:50:43 +0000 (21:50 -0400)]
added a few FIXME comments

17 years agolock odf inode when calling the odf fs's get_parent
Yiannis Pericleous [Wed, 30 May 2007 01:47:53 +0000 (21:47 -0400)]
lock odf inode when calling the odf fs's get_parent

17 years agouse snprintf when printing help in configfs
Yiannis Pericleous [Wed, 30 May 2007 01:45:25 +0000 (21:45 -0400)]
use snprintf when printing help in configfs

17 years agouse 2 bytes for namelen in odf cache dir dirents
Yiannis Pericleous [Wed, 30 May 2007 01:43:22 +0000 (21:43 -0400)]
use 2 bytes for namelen in odf cache dir dirents

17 years agochanged odf options length to PAGE_SIZE
Yiannis Pericleous [Wed, 30 May 2007 01:39:12 +0000 (21:39 -0400)]
changed odf options length to PAGE_SIZE

17 years agofilenames in odf/sr and odf/reclaim to be in hex, not decimal
Yiannis Pericleous [Wed, 30 May 2007 01:06:38 +0000 (21:06 -0400)]
filenames in odf/sr and odf/reclaim to be in hex, not decimal

17 years agoremoved duplicate odf_get_opaque and odf_set_opaque functions
Yiannis Pericleous [Wed, 30 May 2007 01:01:32 +0000 (21:01 -0400)]
removed duplicate odf_get_opaque and odf_set_opaque functions

17 years agoremoved opaque_branch_id field from unionfs_sb_info
Yiannis Pericleous [Wed, 30 May 2007 00:47:37 +0000 (20:47 -0400)]
removed opaque_branch_id field from unionfs_sb_info

17 years agocleanup thread to clean until both blocks and inodes are below threshhold
Yiannis Pericleous [Wed, 30 May 2007 00:41:43 +0000 (20:41 -0400)]
cleanup thread to clean until both blocks and inodes are below threshhold

added new cleanup flags

17 years agocleaned up partial_lookup
Yiannis Pericleous [Tue, 29 May 2007 17:54:55 +0000 (13:54 -0400)]
cleaned up partial_lookup

17 years agoDocumentation: updated odf.txt to say that when a dentry is released from /odf/sr...
Yiannis Pericleous [Tue, 29 May 2007 16:43:32 +0000 (12:43 -0400)]
Documentation: updated odf.txt to say that when a dentry is released from /odf/sr it is

unlinked

17 years agomodified odf_release_sr to unlink instead of renaming to /odf/reclaim
Yiannis Pericleous [Tue, 29 May 2007 16:36:38 +0000 (12:36 -0400)]
modified odf_release_sr to unlink instead of renaming to /odf/reclaim

17 years agodget odf root dentry on odf_read_super
Yiannis Pericleous [Tue, 29 May 2007 16:27:25 +0000 (12:27 -0400)]
dget odf root dentry on odf_read_super

17 years agouse '\0' to null terminate a string
Yiannis Pericleous [Tue, 29 May 2007 16:23:25 +0000 (12:23 -0400)]
use '\0' to null terminate a string

17 years agocoding-style: aligned struct decl to span over multiple lines
Yiannis Pericleous [Tue, 29 May 2007 16:21:18 +0000 (12:21 -0400)]
coding-style: aligned struct decl to span over multiple lines

17 years agoremoved unneeded functions for allocating/freeing odf_dentry_info's
Yiannis Pericleous [Tue, 29 May 2007 16:14:13 +0000 (12:14 -0400)]
removed unneeded functions for allocating/freeing odf_dentry_info's

17 years agocleanup: removed unecessary check at a return value
Yiannis Pericleous [Tue, 29 May 2007 04:43:59 +0000 (00:43 -0400)]
cleanup: removed unecessary check at a return value

17 years agoadded KERN_WARNING to cleanup thread's print messages
Yiannis Pericleous [Tue, 29 May 2007 04:41:19 +0000 (00:41 -0400)]
added KERN_WARNING to cleanup thread's print messages

17 years agocoding-style: removed unecesary cast
Yiannis Pericleous [Tue, 29 May 2007 04:39:22 +0000 (00:39 -0400)]
coding-style: removed unecesary cast

17 years agocoding_style: reformatted lines over 80 chars
Yiannis Pericleous [Tue, 29 May 2007 04:37:35 +0000 (00:37 -0400)]
coding_style: reformatted lines over 80 chars

17 years agofixed odf_parse_options to use strdup and strsep
Yiannis Pericleous [Tue, 29 May 2007 04:35:09 +0000 (00:35 -0400)]
fixed odf_parse_options to use strdup and strsep

look for odf_keepcache instead of odfforce option
fail if dirs specified with old odf

17 years agoinvariants: don't complain if no lower dentry of a deleted dentry
Erez_Zadok [Tue, 29 May 2007 03:24:58 +0000 (23:24 -0400)]
invariants: don't complain if no lower dentry of a deleted dentry

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agomore (forgotten) cleanups to partial_lookup.
Erez_Zadok [Tue, 29 May 2007 01:15:43 +0000 (21:15 -0400)]
more (forgotten) cleanups to partial_lookup.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agoinvariants: don't complain about directories with some NULL lower objects
Erez_Zadok [Mon, 28 May 2007 23:47:35 +0000 (19:47 -0400)]
invariants: don't complain about directories with some NULL lower objects

Directories can have NULL lower objects in between start/end, but NOT if at
the start/end range.  We cannot verify that this dentry is a type=DIR,
because it may already be a negative dentry.  But if dbstart is greater than
dbend, we know that this couldn't have been a regular file: it had to have
been a directory.  In that case, don't complain about NULL lower objects in
in between start/end.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agodocumentation: update of last modification date to odf.txt document
Erez_Zadok [Tue, 29 May 2007 00:50:52 +0000 (20:50 -0400)]
documentation: update of last modification date to odf.txt document

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agocleanup: rewrite unionfs_partial_lookup more cleanly
Erez_Zadok [Tue, 29 May 2007 00:49:51 +0000 (20:49 -0400)]
cleanup: rewrite unionfs_partial_lookup more cleanly

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agobug fix: prevent null mntget warning messages in unionfs_lookup_backend
Erez_Zadok [Mon, 28 May 2007 23:38:14 +0000 (19:38 -0400)]
bug fix: prevent null mntget warning messages in unionfs_lookup_backend

Don't try to mntget a lower mnt at a point where the lower mnts don't yet
exist (the callers will have them later on).  Instead, get the lower mnt of
the sb->s_root.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agodocumentation: expand comments to unionfs_lookup_backend
Erez_Zadok [Tue, 29 May 2007 00:08:20 +0000 (20:08 -0400)]
documentation: expand comments to unionfs_lookup_backend

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

fs/unionfs/lookup.c

17 years agocleanup: remove unnecessary call to inherit_mnt
Erez_Zadok [Mon, 28 May 2007 23:23:42 +0000 (19:23 -0400)]
cleanup: remove unnecessary call to inherit_mnt

Our unionfs_lookup doesn't need to call inherit_mnt: the lower mnts will be
correct here (but not if other methods such as unionfs_rename call our
lookup_backend helper function directly).

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agobug fix: don't warn if trying to mntput a "negative" union object
Erez_Zadok [Mon, 28 May 2007 23:21:21 +0000 (19:21 -0400)]
bug fix: don't warn if trying to mntput a "negative" union object

In unionfs_d_release, we may get negative dentries which don't have a lower
mnt.  In that case, don't print a warning message from unionfs_mntput about
trying to put a NULL mnt.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agobug fix: get lower mnt from root dentry instead of lower dentry
Erez_Zadok [Mon, 28 May 2007 23:18:45 +0000 (19:18 -0400)]
bug fix: get lower mnt from root dentry instead of lower dentry

While copying-up a file, the union object hasn't been fully formed yet, so
we don't have all the lower dentries/mnts to use (the caller will have them
later on).  Therefore, we should use the sb->s_root's lower mnt here.  This
fixes a "NULL mnt" warning message that came from unionfs_mntget.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agocoding-style: removed space before ')'
Yiannis Pericleous [Mon, 28 May 2007 15:53:46 +0000 (11:53 -0400)]
coding-style: removed space before ')'

17 years agocomment on why we cannot create entries in the odf (assign inode nums)
Yiannis Pericleous [Mon, 28 May 2007 15:50:18 +0000 (11:50 -0400)]
comment on why we cannot create entries in the odf (assign inode nums)

when creating the odf cached dir

17 years agoone more comment on the odf_lookup code
Yiannis Pericleous [Mon, 28 May 2007 15:44:08 +0000 (11:44 -0400)]
one more comment on the odf_lookup code

17 years agocomments for odf_lookup functions
Yiannis Pericleous [Mon, 28 May 2007 02:37:17 +0000 (22:37 -0400)]
comments for odf_lookup functions

17 years agoremoved ODF_LOOKUP_LINK flag and moved ODF_RMV_WH to the top of the flags
Yiannis Pericleous [Mon, 28 May 2007 01:53:17 +0000 (21:53 -0400)]
removed ODF_LOOKUP_LINK flag and moved ODF_RMV_WH to the top of the flags

17 years agochanged odf lookup flags values to hex and removed ODF_LOOKUP_LOCKED
Yiannis Pericleous [Mon, 28 May 2007 01:33:54 +0000 (21:33 -0400)]
changed odf lookup flags values to hex and removed ODF_LOOKUP_LOCKED

17 years agochanged unionfs_dentry_info to contain an odf_dentry_info instead of a pointer to one
Yiannis Pericleous [Sat, 26 May 2007 03:50:10 +0000 (23:50 -0400)]
changed unionfs_dentry_info to contain an odf_dentry_info instead of a pointer to one

17 years agomodified odf_lookup functions to return a dentry instead of an
Yiannis Pericleous [Sat, 26 May 2007 02:50:15 +0000 (22:50 -0400)]
modified odf_lookup functions to return a dentry instead of an

odf_dentry_info

17 years agoUnionfs: allow users to override Makefile options in fs/unionfs/local.mk
Erez_Zadok [Sat, 26 May 2007 02:36:13 +0000 (22:36 -0400)]
Unionfs: allow users to override Makefile options in fs/unionfs/local.mk

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agoremove trailing ':' when building dirs= options from odf sb file
Yiannis Pericleous [Fri, 25 May 2007 21:29:23 +0000 (17:29 -0400)]
remove trailing ':' when building dirs= options from odf sb file

17 years agoremoved warning when branch_id_to_idx fails to match requested id, and added a
Yiannis Pericleous [Fri, 25 May 2007 21:20:54 +0000 (17:20 -0400)]
removed warning when branch_id_to_idx fails to match requested id, and added a

comment for why this can be legal in the odf

17 years agobug fix: catch bad use of dirs= options (extra ':' separators)
Erez_Zadok [Fri, 25 May 2007 21:01:00 +0000 (17:01 -0400)]
bug fix: catch bad use of dirs= options (extra ':' separators)

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
17 years agounionfs: merge find_new_branch_index and branch_id_to_idx into one function
Erez_Zadok [Fri, 25 May 2007 20:36:08 +0000 (16:36 -0400)]
unionfs: merge find_new_branch_index and branch_id_to_idx into one function

Useful code cleanup and consolidation between the ODF code and non-ODF code.

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

fs/unionfs/commonfops.c
fs/unionfs/fanout.h

17 years agodont put ic dentry in odf_get_ic_dentry
Yiannis Pericleous [Fri, 25 May 2007 20:25:31 +0000 (16:25 -0400)]
dont put ic dentry in odf_get_ic_dentry

17 years agomodified odf_ic_cache_dentry not to use odf_lookup and to return a dentry instead of
Yiannis Pericleous [Fri, 25 May 2007 19:53:32 +0000 (15:53 -0400)]
modified odf_ic_cache_dentry not to use odf_lookup and to return a dentry instead of

an odf_dentry_info

17 years agounionfs: minor cleanup and better commenting in new_dentry_private_data
Erez_Zadok [Fri, 25 May 2007 19:51:33 +0000 (15:51 -0400)]
unionfs: minor cleanup and better commenting in new_dentry_private_data

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

fs/unionfs/lookup.c

17 years agoUnionfs: Cleanup locking in new_dentry_private_data
Erez_Zadok [Fri, 25 May 2007 19:45:30 +0000 (15:45 -0400)]
Unionfs: Cleanup locking in new_dentry_private_data

Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
Conflicts:

fs/unionfs/lookup.c

17 years agobugfix: prevent null-deref oops if lower f/s is NFS (mmap writes)
Erez_Zadok [Fri, 25 May 2007 19:37:38 +0000 (15:37 -0400)]
bugfix: prevent null-deref oops if lower f/s is NFS (mmap writes)

This is a workaround fora deficiency of the linux MM layer, which doesn't
allow clean coordination between upper and lower pages in stackable layers.
We prevent an oops, but the cost is that we're not able to implement
writepages cleanly, not can we call the lower file system's writepages.

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