Attached updated patch. Christoph Hellwig writes: > On Mon, Jun 23, 2008 at 02:42:27PM +1000, Niv Sardi wrote: >> From: Niv Sardi >> >> We will need that to be able to calculate the size of log we need for >> a specific attr (for parent pointers in create). We need the local so >> that we can fail if we run into ENOSPC when trying to alloc blocks Updated Comments, structs instead of typdefs >> Signed-off-by: Niv Sardi >> --- >> fs/xfs/xfs_attr.c | 78 +++++++++++++++++++++++++++++++--------------------- >> fs/xfs/xfs_attr.h | 2 +- >> 2 files changed, 47 insertions(+), 33 deletions(-) >> >> diff --git a/fs/xfs/xfs_attr.c b/fs/xfs/xfs_attr.c >> index e58f321..0d19e90 100644 >> --- a/fs/xfs/xfs_attr.c >> +++ b/fs/xfs/xfs_attr.c >> @@ -185,6 +185,43 @@ xfs_attr_get( >> } >> >> int >> +xfs_attr_calc_size( > > should be marked STATIC, The whole idea is to be able to use it in xfs_create().