aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2013-05-19 19:51:16 -0400
committerBen Myers <bpm@sgi.com>2013-05-24 17:31:20 -0400
commit7ae077802c9f12959a81fa1a16c1ec2842dbae05 (patch)
tree3406c0f6b04d741ad218190240c7ee04e0501fe7 /fs
parentcf257abf02709dba3cc745d950f144ce49432b4f (diff)
xfs: remote attribute lookups require the value length
When reading a remote attribute, to correctly calculate the length of the data buffer for CRC enable filesystems, we need to know the length of the attribute data. We get this information when we look up the attribute, but we don't store it in the args structure along with the other remote attr information we get from the lookup. Add this information to the args structure so we can use it appropriately. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Ben Myers <bpm@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com> (cherry picked from commit e461fcb194172b3f709e0b478d2ac1bdac7ab9a3)
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/xfs_attr_leaf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/xfs/xfs_attr_leaf.c b/fs/xfs/xfs_attr_leaf.c
index 8eeb88fb3201..0bce1b348580 100644
--- a/fs/xfs/xfs_attr_leaf.c
+++ b/fs/xfs/xfs_attr_leaf.c
@@ -2332,9 +2332,10 @@ xfs_attr3_leaf_lookup_int(
2332 if (!xfs_attr_namesp_match(args->flags, entry->flags)) 2332 if (!xfs_attr_namesp_match(args->flags, entry->flags))
2333 continue; 2333 continue;
2334 args->index = probe; 2334 args->index = probe;
2335 args->valuelen = be32_to_cpu(name_rmt->valuelen);
2335 args->rmtblkno = be32_to_cpu(name_rmt->valueblk); 2336 args->rmtblkno = be32_to_cpu(name_rmt->valueblk);
2336 args->rmtblkcnt = XFS_B_TO_FSB(args->dp->i_mount, 2337 args->rmtblkcnt = XFS_B_TO_FSB(args->dp->i_mount,
2337 be32_to_cpu(name_rmt->valuelen)); 2338 args->valuelen);
2338 return XFS_ERROR(EEXIST); 2339 return XFS_ERROR(EEXIST);
2339 } 2340 }
2340 } 2341 }