From 81cc40fee8b9cebcf5fc544c5d0c734fa7dfbb90 Mon Sep 17 00:00:00 2001 From: Vikas Gorur Date: Tue, 6 Oct 2009 06:45:04 +0000 Subject: storage/posix: Process "glusterfs.content" key in lookup only for regular files. Signed-off-by: Anand V. Avati BUG: 301 (lookup should ignore ISDIR error when trying to get content) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=301 --- xlators/storage/posix/src/posix.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xlators/storage/posix') diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index 9e9c86349..ad71b6783 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -110,7 +110,9 @@ _posix_xattr_get_set (dict_t *xattr_req, /* should size be put into the data_t ? */ - if (!strcmp (key, "glusterfs.content")) { + if (!strcmp (key, "glusterfs.content") + && S_ISREG (filler->stbuf->st_mode)) { + /* file content request */ req_size = data_to_uint64 (data); if (req_size >= filler->stbuf->st_size) { -- cgit