[v2] Handle OFD lock flags

Submitted by Stefan Agner on July 20, 2020, 8:37 a.m. | Patch ID: 174557

Details

Message ID 20200720083743.12097-1-stefan@agner.ch
State New
Headers show

Commit Message

Stefan Agner July 20, 2020, 8:37 a.m.
Linux 3.15 and newer introduced new open file description locks.
Currently pseudo prints a warning if fcntl is used with OFD locks:
  unknown fcntl argument 37, assuming long argument.

However, calls to fcntl with a OFC lock set need a struct flock
pointer. Treat F_OFD_GETLK (and friends) like F_GETLK (and friends).

This issue has been observed with ostree. Comparing strace output
between two runs with/without this patch shows the same fcntl calls,
hence it seems not to matter in practice.

Signed-off-by: Stefan Agner <stefan@agner.ch>
---
 ports/linux/guts/fcntl.c | 5 +++++
 1 file changed, 5 insertions(+)

Patch hide | download patch | download mbox

diff --git a/ports/linux/guts/fcntl.c b/ports/linux/guts/fcntl.c
index 4dd9796..434c7f3 100644
--- a/ports/linux/guts/fcntl.c
+++ b/ports/linux/guts/fcntl.c
@@ -52,6 +52,11 @@ 
 	case F_GETLK:
 	case F_SETLK:
 	case F_SETLKW:
+#ifdef F_OFD_GETLK
+	case F_OFD_GETLK:
+	case F_OFD_SETLK:
+	case F_OFD_SETLKW:
+#endif
 		rc = real_fcntl(fd, cmd, lock);
 		break;
 #if defined(F_GETLK64) && (F_GETLK64 != F_GETLK)

Comments

Stefan Agner July 20, 2020, 9:04 a.m.
I guess I should have prefixed that one with [pseudo].

--
Stefan

On 2020-07-20 11:02, Patchwork wrote:
> == Series Details ==
> 
> Series: Handle OFD lock flags (rev2)
> Revision: 2
> URL   : https://patchwork.openembedded.org/series/15665/
> State : failure
> 
> == Summary ==
> 
> 
> Thank you for submitting this patch series to OpenEmbedded Core. This is
> an automated response. Several tests have been executed on the proposed
> series by patchtest resulting in the following failures:
> 
> 
> 
> * Issue             Series does not apply on top of target branch
> [test_series_merge_on_head]
>   Suggested fix    Rebase your series on top of targeted branch
>   Targeted branch  master (currently at 532ae127c5)
> 
> * Patch            [v2] Handle OFD lock flags
>  Issue             Shortlog does not follow expected format
> [test_shortlog_format]
>   Suggested fix    Commit shortlog (first line of commit message)
> should follow the format "<target>: <summary>"
> 
> 
> 
> If you believe any of these test results are incorrect, please reply to the
> mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
> Otherwise we would appreciate you correcting the issues and submitting a new
> version of the patchset if applicable. Please ensure you add/increment the
> version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
> [PATCH v3] -> ...).
> 
> ---
> Guidelines:    
> https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
> Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
> Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#140802): https://lists.openembedded.org/g/openembedded-core/message/140802
Mute This Topic: https://lists.openembedded.org/mt/75678408/3617530
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  [oe-patchwork@oe-patch.openembedded.org]
-=-=-=-=-=-=-=-=-=-=-=-