aboutsummaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_attr_leaf.c
AgeCommit message (Collapse)AuthorFilesLines
2009-03-29xfs: remove m_attroffsetChristoph Hellwig1-1/+2
With the upcoming v3 inodes the default attroffset needs to be calculated for each specific inode, so we can't cache it in the superblock anymore. Also replace the assert for wrong inode sizes with a proper error check also included in non-debug builds. Note that the ENOSYS return for that might seem odd, but that error is returned by xfs_mount_validate_sb for all theoretically valid but not supported filesystem geometries. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Josef 'Jeff' Sipek <[email protected]>
2009-02-04xfs: factor out attr fork reset handlingChristoph Hellwig1-30/+25
We currently duplicate code to reset the attribute fork after the last attribute has been deleted. Factor this out into a small helper. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Felix Blyakher <[email protected]>
2009-01-09[XFS] Remove macro-to-function indirections in attr codeEric Sandeen1-36/+36
Signed-off-by: Eric Sandeen <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Lachlan McIlroy <[email protected]>
2008-08-13[XFS] Move xfs_attr_rolltrans to xfs_trans_rollNiv Sardi1-67/+8
Move it from the attr code to the transaction code and make the attr code call the new function. We rolltrans is really usefull whenever we want to use rolling transaction, should be generic, it isn't dependent on any part of the attr code anyway. We use this excuse to change all the: if ((error = xfs_attr_rolltrans())) calls into: error = xfs_trans_roll(); if (error) SGI-PV: 981498 SGI-Modid: xfs-linux-melb:xfs-kern:31729a Signed-off-by: Niv Sardi <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Lachlan McIlroy <[email protected]>
2008-07-28[XFS] Switches xfs_vn_listxattr to set it's put_listent callback directlyChristoph Hellwig1-54/+7
and not go through xfs_attr_list. SGI-PV: 983395 SGI-Modid: xfs-linux-melb:xfs-kern:31324a Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Tim Shimmin <[email protected]> Signed-off-by: Lachlan McIlroy <[email protected]>
2008-07-28[XFS] Add op_flags field and helpers to xfs_da_argsBarry Naujok1-9/+11
The end of the xfs_da_args structure has 4 unsigned char fields for true/false information on directory and attr operations using the xfs_da_args structure. The following converts these 4 into a op_flags field that uses the first 4 bits for these fields and allows expansion for future operation information (eg. case-insensitive lookup request). SGI-PV: 981520 SGI-Modid: xfs-linux-melb:xfs-kern:31206a Signed-off-by: Barry Naujok <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
2008-07-28[XFS] Remove unused arg from kmem_free()Denys Vlasenko1-9/+9
kmem_free() function takes (ptr, size) arguments but doesn't actually use second one. This patch removes size argument from all callsites. SGI-PV: 981498 SGI-Modid: xfs-linux-melb:xfs-kern:31050a Signed-off-by: Denys Vlasenko <[email protected]> Signed-off-by: David Chinner <[email protected]> Signed-off-by: Lachlan McIlroy <[email protected]>
2008-04-18[XFS] Always use di_forkoff when checking for attr space.Eric Sandeen1-1/+1
In the case where we mount a filesystem which was previously using the attr2 format as attr1, returning the default mp->m_attroffset instead of the per-inode di_forkoff for inline attribute fit calculations, may result in corruption, if for example, the data fork is already taking more space than the default fork offset and we try to add an extended attribute. Fix tested by xfstests/186. SGI-PV: 979606 SGI-Modid: xfs-linux-melb:xfs-kern:30861a Signed-off-by: Eric Sandeen <[email protected]> Signed-off-by: Tim Shimmin <[email protected]> Signed-off-by: Lachlan McIlroy <[email protected]>
2008-04-10[XFS] remove shouting-indirection macros from xfs_sb.hEric Sandeen1-3/+3
Remove macro-to-small-function indirection from xfs_sb.h, and remove some which are completely unused. SGI-PV: 976035 SGI-Modid: xfs-linux-melb:xfs-kern:30528a Signed-off-by: Eric Sandeen <[email protected]> Signed-off-by: Donald Douwsma <[email protected]> Signed-off-by: Lachlan McIlroy <[email protected]>
2008-02-13xfs: convert beX_add to beX_add_cpu (new common API)Marcin Slusarz1-23/+23
remove beX_add functions and replace all uses with beX_add_cpu Signed-off-by: Marcin Slusarz <[email protected]> Cc: Mark Fasheh <[email protected]> Reviewed-by: Dave Chinner <[email protected]> Cc: Timothy Shimmin <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2008-02-07[XFS] Unwrap XFS_SB_LOCK.Eric Sandeen1-5/+3
Un-obfuscate XFS_SB_LOCK, remove XFS_SB_LOCK->mutex_lock->spin_lock macros, call spin_lock directly, remove extraneous cookie holdover from old xfs code, and change lock type to spinlock_t. SGI-PV: 970382 SGI-Modid: xfs-linux-melb:xfs-kern:29746a Signed-off-by: Eric Sandeen <[email protected]> Signed-off-by: Donald Douwsma <[email protected]> Signed-off-by: Tim Shimmin <[email protected]>
2007-05-08[XFS] The last argument "lsn" of xfs_trans_commit() is always called withEric Sandeen1-1/+1
NULL. Patch provided by Eric Sandeen. SGI-PV: 961693 SGI-Modid: xfs-linux-melb:xfs-kern:28199a Signed-off-by: Eric Sandeen <[email protected]> Signed-off-by: Lachlan McIlroy <[email protected]> Signed-off-by: Tim Shimmin <[email protected]>
2007-02-10[XFS] Fix assertion in xfs_attr_shortform_remove().Lachlan McIlroy1-1/+2
SGI-PV: 960791 SGI-Modid: xfs-linux-melb:xfs-kern:28021a Signed-off-by: Lachlan McIlroy <[email protected]> Signed-off-by: Barry Naujok <[email protected]> Signed-off-by: Tim Shimmin <[email protected]>
2007-02-10[XFS] Fix attr2 corruption with btree data extentsBarry Naujok1-3/+42
SGI-PV: 958747 SGI-Modid: xfs-linux-melb:xfs-kern:27792a Signed-off-by: Barry Naujok <[email protected]> Signed-off-by: Russell Cattelan <[email protected]> Signed-off-by: Tim Shimmin <[email protected]>
2007-02-10[XFS] Keep stack usage down for 4k stacks by using noinline.David Chinner1-3/+3
gcc-4.1 and more recent aggressively inline static functions which increases XFS stack usage by ~15% in critical paths. Prevent this from occurring by adding noinline to the STATIC definition. Also uninline some functions that are too large to be inlined and were causing problems with CONFIG_FORCED_INLINING=y. Finally, clean up all the different users of inline, __inline and __inline__ and put them under one STATIC_INLINE macro. For debug kernels the STATIC_INLINE macro uninlines those functions. SGI-PV: 957159 SGI-Modid: xfs-linux-melb:xfs-kern:27585a Signed-off-by: David Chinner <[email protected]> Signed-off-by: David Chatterton <[email protected]> Signed-off-by: Tim Shimmin <[email protected]>
2006-09-28[XFS] Add EA list callbacks for xfs kernel use. Cleanup some namespaceTim Shimmin1-196/+155
code. SGI-PV: 954372 SGI-Modid: xfs-linux-melb:xfs-kern:26583a Signed-off-by: Tim Shimmin <[email protected]>
2006-06-20[XFS] Remove version 1 directory code. Never functioned on Linux, justNathan Scott1-2/+0
pure bloat. SGI-PV: 952969 SGI-Modid: xfs-linux-melb:xfs-kern:26251a Signed-off-by: Nathan Scott <[email protected]>
2006-06-09[XFS] Add parameters to xfs_bmapi() and xfs_bunmapi() to have them reportOlaf Weber1-1/+1
the range spanned by modifications to the in-core extent map. Add XFS_BUNMAPI() and XFS_SWAP_EXTENTS() macros that call xfs_bunmapi() and xfs_swap_extents() via the ioops vector. Change all calls that may modify the in-core extent map for the data fork to go through the ioops vector. This allows a cache of extent map data to be kept in sync. SGI-PV: 947615 SGI-Modid: xfs-linux-melb:xfs-kern:209226a Signed-off-by: Olaf Weber <[email protected]> Signed-off-by: Nathan Scott <[email protected]>
2006-03-29[XFS] We really suck at spulling. Thanks to Chris Pascoe for fixing allNathan Scott1-2/+2
these typos. SGI-PV: 904196 SGI-Modid: xfs-linux-melb:xfs-kern:25539a Signed-off-by: Nathan Scott <[email protected]>
2006-03-17[XFS] endianess annotations for xfs_da_node_hdr_t Nathan Scott1-2/+2
SGI-PV: 943272 SGI-Modid: xfs-linux-melb:xfs-kern:25505a Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Nathan Scott <[email protected]>
2006-03-17[XFS] endianess annotations for xfs_da_node_entry_t Nathan Scott1-3/+3
SGI-PV: 943272 SGI-Modid: xfs-linux-melb:xfs-kern:25504a Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Nathan Scott <[email protected]>
2006-03-17[XFS] store xfs_attr_inactive_list_t in native endian Nathan Scott1-9/+5
SGI-PV: 943272 SGI-Modid: xfs-linux-melb:xfs-kern:25503a Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Nathan Scott <[email protected]>
2006-03-17[XFS] store xfs_attr_sf_sort in native endian Nathan Scott1-10/+7
SGI-PV: 943272 SGI-Modid: xfs-linux-melb:xfs-kern:25502a Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Nathan Scott <[email protected]>
2006-03-17[XFS] endianess annotations for xfs_attr_shortform_t Nathan Scott1-30/+25
SGI-PV: 943272 SGI-Modid: xfs-linux-melb:xfs-kern:25501a Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Nathan Scott <[email protected]>
2006-03-17[XFS] endianess annotations for xfs_attr_leaf_name_remote_t Nathan Scott1-14/+10
SGI-PV: 943272 SGI-Modid: xfs-linux-melb:xfs-kern:25500a Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Nathan Scott <[email protected]>
2006-03-17[XFS] endianess annotations for xfs_attr_leaf_name_local_t Nathan Scott1-10/+8
SGI-PV: 943272 SGI-Modid: xfs-linux-melb:xfs-kern:25499a Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Nathan Scott <[email protected]>
2006-03-17[XFS] endianess annotations for xfs_attr_leaf_entry_t Nathan Scott1-74/+59
SGI-PV: 943272 SGI-Modid: xfs-linux-melb:xfs-kern:25498a Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Nathan Scott <[email protected]>
2006-03-17[XFS] endianess annotations for xfs_attr_leaf_hdr_t Nathan Scott1-226/+188
SGI-PV: 943272 SGI-Modid: xfs-linux-melb:xfs-kern:25497a Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Nathan Scott <[email protected]>
2006-03-17[XFS] endianess annotations for xfs_da_blkinfo_t Nathan Scott1-63/+35
SGI-PV: 943272 SGI-Modid: xfs-linux-melb:xfs-kern:25495a Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Nathan Scott <[email protected]>
2006-01-11[XFS] Reverse the sense of COMPAT_ATTR and ATTR2, keeps it simple andNathan Scott1-6/+6
consistent. SGI-PV: 941645 SGI-Modid: xfs-linux-melb:xfs-kern:202961a Signed-off-by: Nathan Scott <[email protected]>
2005-11-25[XFS] Fix a case where attr2 format was being used unconditionally.Nathan Scott1-3/+8
SGI-PV: 941645 SGI-Modid: xfs-linux-melb:xfs-kern:24566a Signed-off-by: Nathan Scott <[email protected]>
2005-11-02[XFS] Fix up a 32/64 local flags variable issue when enabling attr2 mode.Nathan Scott1-6/+6
SGI-PV: 941645 SGI-Modid: xfs-linux:xfs-kern:23925a Signed-off-by: Nathan Scott <[email protected]>
2005-11-02[XFS] Update license/copyright notices to match the prefered SGINathan Scott1-25/+11
boilerplate. SGI-PV: 913862 SGI-Modid: xfs-linux:xfs-kern:23903a Signed-off-by: Nathan Scott <[email protected]>
2005-11-02[XFS] Remove xfs_macros.c, xfs_macros.h, rework headers a whole lot.Nathan Scott1-14/+7
SGI-PV: 943122 SGI-Modid: xfs-linux:xfs-kern:23901a Signed-off-by: Nathan Scott <[email protected]>
2005-11-02[XFS] Fix up an internal sort function name collision issue.Nathan Scott1-1/+1
SGI-PV: 942986 SGI-Modid: xfs-linux:xfs-kern:23859a Signed-off-by: Nathan Scott <[email protected]>
2005-11-02[XFS] Ondisk format extension for extended attributes (attr2). Basically,Nathan Scott1-25/+152
the data/attr forks now grow up/down from either end of the literal area, rather than dividing the literal area into two chunks and growing both upward. Means we can now make much more efficient use of the attribute space, incl. fitting DMF attributes inline in 256 byte inodes, and large jumps in dbench3 performance numbers. It is self enabling, but can be forced on/off via the attr2/noattr2 mount options. SGI-PV: 941645 SGI-Modid: xfs-linux:xfs-kern:23835a Signed-off-by: Nathan Scott <[email protected]>
2005-11-02[XFS] Move some code around to prepare for the upcoming extendedNathan Scott1-17/+22
attributes format change (attr2). SGI-PV: 941645 SGI-Modid: xfs-linux:xfs-kern:23833a Signed-off-by: Nathan Scott <[email protected]>
2005-06-21[XFS] mark various symbols static Patch from Adrian BunkChristoph Hellwig1-6/+22
SGI-PV: 936255 SGI-Modid: xfs-linux:xfs-kern:192760a Signed-off-by: Christoph Hellwig <[email protected]> Signed-off-by: Nathan Scott <[email protected]>
2005-04-16Linux-2.6.12-rc2Linus Torvalds1-0/+3050
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!