From c1fd29003e68268cf81a72b83865f473a21d0d2f Mon Sep 17 00:00:00 2001 From: Vikas Gorur Date: Tue, 6 Oct 2009 06:45:30 +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/src/posix.c') diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index 8839c4975..29a98df38 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -105,7 +105,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