summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/xattr.c
Commit message (Collapse)AuthorAgeFilesLines
...
| * Btrfs: Integrate metadata reservation with start_transactionYan, Zheng2010-05-251-9/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Besides simplify the code, this change makes sure all metadata reservation for normal metadata operations are released after committing transaction. Changes since V1: Add code that check if unlink and rmdir will free space. Add ENOSPC handling for clone ioctl. Signed-off-by: Yan Zheng <zheng.yan@oracle.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
* | btrfs: constify xattr_handlerStephen Hemminger2010-05-211-1/+1
|/ | | | | Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* Btrfs: Pass transaction handle to security and ACL initialization functionsYan, Zheng2009-12-171-26/+54
| | | | | | | | Pass transaction handle down to security and ACL initialization functions, so we can avoid starting nested transactions Signed-off-by: Yan Zheng <zheng.yan@oracle.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: fix btrfs acl #ifdef checksChris Mason2009-10-131-1/+1
| | | | | | | | The btrfs acl code was #ifdefing for a define that didn't exist. This correctly matches it to the values used by the Kconfig file. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Use CONFIG_BTRFS_POSIX_ACL to enable ACL codeChris Ball2009-09-291-1/+1
| | | | | | | | | We've already defined CONFIG_BTRFS_POSIX_ACL in Kconfig, but we're currently not using it and are testing CONFIG_FS_POSIX_ACL instead. CONFIG_FS_POSIX_ACL states "Never use this symbol for ifdefs". Signed-off-by: Chris Ball <cjb@laptop.org> Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: join the transaction in __btrfs_setxattrJosef Bacik2009-02-041-1/+1
| | | | | | | | | | | | | | With selinux on we end up calling __btrfs_setxattr when we create an inode, which calls btrfs_start_transaction(). The problem is we've already called that in btrfs_new_inode, and in btrfs_start_transaction we end up doing a wait_current_trans(). If btrfs-transaction has started committing it will wait for all handles to finish, while the other process is waiting for the transaction to commit. This is fixed by using btrfs_join_transaction, which won't wait for the transaction to commit. Thanks, Signed-off-by: Josef Bacik <jbacik@redhat.com>
* Btrfs: selinux supportJim Owens2009-02-041-0/+32
| | | | | | | | | | | Add call to LSM security initialization and save resulting security xattr for new inodes. Add xattr support to symlink inode ops. Set inode->i_op for existing special files. Signed-off-by: jim owens <jowens@hp.com>
* Btrfs: cleanup xattr codeJosef Bacik2009-01-211-2/+12
| | | | | | | | | | Andrew's review of the xattr code revealed some minor issues that this patch addresses. Just an error return fix, got rid of a useless statement and commented one of the trickier parts of __btrfs_getxattr. Signed-off-by: Josef Bacik <jbacik@redhat.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix checkpatch.pl warningsChris Mason2009-01-051-1/+2
| | | | | | | There were many, most are fixed now. struct-funcs.c generates some warnings but these are bogus. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: fix return value from btrfs_listxattr when buffer size is too smallYehuda Sadeh Weinraub2008-12-171-1/+1
| | | | | | | The return value was being overwritten. Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
* Btrfs: optimize btrget/set/removexattrChristoph Hellwig2008-09-251-131/+73
| | | | | | | | | | | | btrfs actually stores the whole xattr name, including the prefix ondisk, so using the generic resolver that strips off the prefix is not very helpful. Instead do the real ondisk xattrs manually and only use the generic resolver for synthetic xattrs like ACLs. (Sorry Josef for guiding you towards the wrong direction here intially) Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Chris Mason <chris.mason@oracle.com>
* btrfs: optmize listxattrChristoph Hellwig2008-09-251-71/+11
| | | | | | | | | | | | | The ->list handler is really not useful at all, because we always call btrfs_xattr_generic_list anyway. After this is done find_btrfs_xattr_handler becomes unused, and it becomes obvious that the temporary name buffer allocation isn't needed but we can directly copy into the supplied buffer. Tested with various getfattr -d calls on varying xattr lists. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Add ACL supportJosef Bacik2008-09-251-10/+16
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Remove unused xattr codeJosef Bacik2008-09-251-51/+0
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Replace the big fs_mutex with a collection of other locksChris Mason2008-09-251-9/+1
| | | | | | | | Extent alloctions are still protected by a large alloc_mutex. Objectid allocations are covered by a objectid mutex Other btree operations are protected by a lock on individual btree nodes Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Dislable acl xattr handlersYan2008-09-251-6/+6
| | | | | | | The acl code is not yet complete, and the xattr handlers are causing problems for cp -p on some distros. Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Fix compile on kernel without ACLs enabledYan2008-09-251-2/+4
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Change magic string to reflect new formatChris Mason2008-09-251-1/+2
| | | | Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Implement ACLs setting and gettingYan2008-09-251-12/+4
| | | | | | ACLs are stored but not used for permission checks (yet) Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: xattr fixesJosef Bacik2008-09-251-2/+2
| | | | | | This fixes two typos that Yan pointed out to me. Thanks much, Signed-off-by: Chris Mason <chris.mason@oracle.com>
* Btrfs: Make ACLs return EOPNOTSUPP for nowJosef Bacik2008-09-251-2/+2
| | | | | | | | | | | | | | There was a slight problem with ACL's returning EINVAL when you tried to set an ACL. This isn't correct, we should be returning EOPNOTSUPP, so I did a very ugly thing and just commented everybody out and made them return EOPNOTSUPP. This is only temporary, I'm going back to implement ACL's, but Chris wants to push out a release so this will suffice for now. Also Yan suggested setting reada to -1 in the delete case to enable backwards readahead, and in the listxattr case I moved path->reada = 2; to after the if (!path) check so we can avoid a possible null dereference. Thank you, Signed-off-by: Chris Mason <chris.mason@oracle.com>
* xattr support for btrfsJosef Bacik2008-09-251-0/+497
Signed-off-by: Chris Mason <chris.mason@oracle.com>
OpenPOWER on IntegriCloud