All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: lifeng1519@gmail.com, "open list:raw" <qemu-block@nongnu.org>,
	"open list:All patches CC here" <qemu-devel@nongnu.org>,
	Max Reitz <mreitz@redhat.com>,
	kyle@smartx.com, Li Feng <fengli@smartx.com>
Subject: Re: [PATCH] file-posix: detect the lock using the real file
Date: Wed, 9 Dec 2020 09:33:26 +0000	[thread overview]
Message-ID: <20201209093326.GD3214234@redhat.com> (raw)
In-Reply-To: <20201208143822.GA6392@merkur.fritz.box>

On Tue, Dec 08, 2020 at 03:38:22PM +0100, Kevin Wolf wrote:
> Am 08.12.2020 um 13:59 hat Li Feng geschrieben:
> > This patch addresses this issue:
> > When accessing a volume on an NFS filesystem without supporting the file lock,
> > tools, like qemu-img, will complain "Failed to lock byte 100".
> > 
> > In the original code, the qemu_has_ofd_lock will test the lock on the
> > "/dev/null" pseudo-file. Actually, the file.locking is per-drive property,
> > which depends on the underlay filesystem.
> > 
> > In this patch, make the 'qemu_has_ofd_lock' with a filename be more generic
> > and reasonable.
> > 
> > Signed-off-by: Li Feng <fengli@smartx.com>
> 
> Do you know any way how I could configure either the NFS server or the
> NFS client such that locking would fail? For any patch related to this,
> it would be good if I could even test the scenario.

One could write a qtest that uses an LD_PRELOAD to replace the standard
glibc fcntl() function with one that returns an error for locking commands.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  parent reply	other threads:[~2020-12-09  9:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-08 12:59 [PATCH] file-posix: detect the lock using the real file Li Feng
2020-12-08 13:45 ` Daniel P. Berrangé
2020-12-09  3:49   ` Li Feng
2020-12-08 14:38 ` Kevin Wolf
2020-12-09  4:09   ` Li Feng
2020-12-09  9:33   ` Daniel P. Berrangé [this message]
2020-12-09 17:43     ` Kevin Wolf
2020-12-10 14:56       ` Li Feng
2020-12-10 15:29         ` Daniel P. Berrangé
2020-12-10 15:53           ` Feng Li
2020-12-10 15:56             ` Daniel P. Berrangé
2020-12-09  4:54 ` [PATCH v2] " Li Feng
2020-12-10 15:59   ` Daniel P. Berrangé
2020-12-10 16:12     ` Feng Li

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=20201209093326.GD3214234@redhat.com \
    --to=berrange@redhat.com \
    --cc=fengli@smartx.com \
    --cc=kwolf@redhat.com \
    --cc=kyle@smartx.com \
    --cc=lifeng1519@gmail.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.