>From Jeff Layton <jlay...@redhat.com>:
Jeff Layton has uploaded this change for review. (
https://review.gerrithub.io/403320
Change subject: FSAL_CEPH: fix libcephfs result handling in read2/write2 ops
......................................................................
FSAL_CEPH: fix libcephfs result handling in read2/write2 ops
The recent code changes to add vectored I/O to FSAL_CEPH doesn't handle
the result correctly. First, it breaks out of the loop before fixing up
the lengths if the offset is 0. That means that reading from the
beginning of the file automatically returns a bunch of NULLs and writes
to the beginning of the file fail.
Also, it seems to place some significance on the offset being -1. I'm
unclear on why we'd treat that as a special case. Either it's already
-1ULL when we enter the function, or we will have just happened to have
hit that magic offset after iterating over a particular iovec. Let's
just remove that check and use a zero-length but successful read or
write as an indicator to stop looping.
Finally, treat a successful but zero-length read as an EOF condition,
instead of requiring that the client issue another read to discover
that.
Change-Id: I628f0a694f1a0b26e9d76203a59e4493c0a8e25e
Reported-by: Patrick Donnelly <pdonn...@redhat.com>
Signed-off-by: Jeff Layton <jlay...@redhat.com>
---
M src/FSAL/FSAL_CEPH/handle.c
1 file changed, 7 insertions(+), 8 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha
refs/changes/20/403320/1
--
To view, visit https://review.gerrithub.io/403320
To unsubscribe, visit https://review.gerrithub.io/settings
Gerrit-Project: ffilz/nfs-ganesha
Gerrit-Branch: next
Gerrit-MessageType: newchange
Gerrit-Change-Id: I628f0a694f1a0b26e9d76203a59e4493c0a8e25e
Gerrit-Change-Number: 403320
Gerrit-PatchSet: 1
Gerrit-Owner: Jeff Layton <jlay...@redhat.com>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Nfs-ganesha-devel mailing list
Nfs-ganesha-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel