Skip to content

Commit

Permalink
Merge git://git.infradead.org/jffs2-xattr-2.6
Browse files Browse the repository at this point in the history
Signed-off-by: David Woodhouse <[email protected]>
  • Loading branch information
dwmw2 committed May 20, 2006
2 parents 1417fc4 + 20a92fc commit 0cfc7da
Show file tree
Hide file tree
Showing 29 changed files with 2,822 additions and 15 deletions.
38 changes: 38 additions & 0 deletions fs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1075,6 +1075,44 @@ config JFFS2_FS_DEBUG
If reporting bugs, please try to have available a full dump of the
messages at debug level 1 while the misbehaviour was occurring.

config JFFS2_FS_XATTR
bool "JFFS2 XATTR support"
depends on JFFS2_FS
default n
help
Extended attributes are name:value pairs associated with inodes by
the kernel or by users (see the attr(5) manual page, or visit
<http://acl.bestbits.at/> for details).

If unsure, say N.

config JFFS2_FS_POSIX_ACL
bool "JFFS2 POSIX Access Control Lists"
depends on JFFS2_FS_XATTR
default y
select FS_POSIX_ACL
help
Posix Access Control Lists (ACLs) support permissions for users and
groups beyond the owner/group/world scheme.

To learn more about Access Control Lists, visit the Posix ACLs for
Linux website <http://acl.bestbits.at/>.

If you don't know what Access Control Lists are, say N

config JFFS2_FS_SECURITY
bool "JFFS2 Security Labels"
depends on JFFS2_FS_XATTR
default y
help
Security labels support alternative access control models
implemented by security modules like SELinux. This option
enables an extended attribute handler for file security
labels in the jffs2 filesystem.

If you are not using a security module that requires using
extended attributes for file security labels, say N.

config JFFS2_FS_WRITEBUFFER
bool "JFFS2 write-buffering support"
depends on JFFS2_FS
Expand Down
3 changes: 3 additions & 0 deletions fs/jffs2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jffs2-y += symlink.o build.o erase.o background.o fs.o writev.o
jffs2-y += super.o debug.o

jffs2-$(CONFIG_JFFS2_FS_WRITEBUFFER) += wbuf.o
jffs2-$(CONFIG_JFFS2_FS_XATTR) += xattr.o xattr_trusted.o xattr_user.o
jffs2-$(CONFIG_JFFS2_FS_SECURITY) += security.o
jffs2-$(CONFIG_JFFS2_FS_POSIX_ACL) += acl.o
jffs2-$(CONFIG_JFFS2_RUBIN) += compr_rubin.o
jffs2-$(CONFIG_JFFS2_RTIME) += compr_rtime.o
jffs2-$(CONFIG_JFFS2_ZLIB) += compr_zlib.o
Expand Down
21 changes: 21 additions & 0 deletions fs/jffs2/README.Locking
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,24 @@ the buffer.

Ordering constraints:
Lock wbuf_sem last, after the alloc_sem or and f->sem.


c->xattr_sem
------------

This read/write semaphore protects against concurrent access to the
xattr related objects which include stuff in superblock and ic->xref.
In read-only path, write-semaphore is too much exclusion. It's enough
by read-semaphore. But you must hold write-semaphore when updating,
creating or deleting any xattr related object.

Once xattr_sem released, there would be no assurance for the existence
of those objects. Thus, a series of processes is often required to retry,
when updating such a object is necessary under holding read semaphore.
For example, do_jffs2_getxattr() holds read-semaphore to scan xref and
xdatum at first. But it retries this process with holding write-semaphore
after release read-semaphore, if it's necessary to load name/value pair
from medium.

Ordering constraints:
Lock xattr_sem last, after the alloc_sem.
Loading

0 comments on commit 0cfc7da

Please sign in to comment.