From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Li Feng <fengli@smartx.com>
Cc: Kevin Wolf <kwolf@redhat.com>, Feng Li <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 Zhang <kyle@smartx.com>
Subject: Re: [PATCH] file-posix: detect the lock using the real file
Date: Thu, 10 Dec 2020 15:29:21 +0000 [thread overview]
Message-ID: <20201210152730.GK24855@redhat.com> (raw)
In-Reply-To: <CAHckoCxunkqV6=-KKwbcB9_hbY0HUV7k+syHnHvwKnqXx6FDtw@mail.gmail.com>
On Thu, Dec 10, 2020 at 10:56:59PM +0800, Li Feng wrote:
> Kevin Wolf <kwolf@redhat.com> 于2020年12月10日周四 上午1:43写道:
> >
> > Am 09.12.2020 um 10:33 hat Daniel P. Berrangé geschrieben:
> > > 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.
> >
> > Sounds a bit ugly, but for regression testing it could make sense.
> >
> > However, part of the testing would be to verify that we our checks
> > actually match the kernel code, which this approach couldn't solve.
> >
> Hi, Kevin and Daniel.
>
> How about this patch? I think it's very straightforward.
> Except we need a mock syscall test case.
You don't seem to have attached any patch here.
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 :|
next prev parent reply other threads:[~2020-12-10 15:32 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é
2020-12-09 17:43 ` Kevin Wolf
2020-12-10 14:56 ` Li Feng
2020-12-10 15:29 ` Daniel P. Berrangé [this message]
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=20201210152730.GK24855@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.