Date: Wed, 12 Oct 2022 04:03:50 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 266886] [FUSEFS] Handling of l_whence with fcntl(F_GETLK) Message-ID: <bug-266886-227-3reSe7G4N7@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-266886-227@https.bugs.freebsd.org/bugzilla/> References: <bug-266886-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D266886 --- Comment #2 from John Millikin <jmillikin@gmail.com> --- I think my initial message was partially incorrect -- the offsets are being calculated correctly, it's just that `l_whence` doesn't get set to `SEEK_SE= T` when the call is complete. /* &fl populated per your example */ fcntl(fd, F_GETLK, &fl)); /* fuse server request and response RECV fuse_lk_in { lk: fuse_file_lock { start: 500, end: 509, .. },= .. } SEND fuse_lk_out { lk: fuse_file_lock { start: 500, end: 509, .. } } */ ASSERT_EQ(fl.l_start, 500); ASSERT_EQ(fl.l_len, 10); ASSERT_EQ(fl.l_whence, SEEK_SET); /* fails */ In other words, I would expect one of the following to be true after fcntl returns: 1. l_start is an absolute location within the file, and l_whence is SEEK_SE= T. 2. l_start is relative to the file position, and l_whence is SEEK_CUR. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-266886-227-3reSe7G4N7>