Openembedded Core Discussions
 help / color / mirror / Atom feed
From: "Stefan Agner" <stefan@agner.ch>
To: openembedded-core@lists.openembedded.org, seebs@seebs.net
Cc: ross.burton@intel.com, stefan@agner.ch
Subject: [PATCH v2] Handle OFD lock flags
Date: Mon, 20 Jul 2020 10:37:43 +0200	[thread overview]
Message-ID: <20200720083743.12097-1-stefan@agner.ch> (raw)

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(+)

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)
-- 
2.27.0


             reply	other threads:[~2020-07-20  8:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-20  8:37 Stefan Agner [this message]
2020-07-20  9:02 ` ✗ patchtest: failure for Handle OFD lock flags (rev2) Patchwork
2020-07-20  9:04   ` Stefan Agner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200720083743.12097-1-stefan@agner.ch \
    --to=stefan@agner.ch \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=ross.burton@intel.com \
    --cc=seebs@seebs.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox