From: Stefan Hajnoczi <stefanha@gmail.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: agraf@suse.de, gollub@b1-systems.de, qemu-devel@nongnu.org,
lcapitulino@redhat.com
Subject: Re: [Qemu-devel] buildbot failure in qemu on default_x86_64_rhel5
Date: Tue, 4 Oct 2011 11:29:38 +0100 [thread overview]
Message-ID: <20111004102938.GA32199@stefanha-thinkpad.localdomain> (raw)
In-Reply-To: <87pqidgn1n.fsf@skywalker.in.ibm.com>
On Tue, Oct 04, 2011 at 02:18:20PM +0530, Aneesh Kumar K.V wrote:
> On Tue, 4 Oct 2011 08:18:07 +0100, Stefan Hajnoczi <stefanha@gmail.com> wrote:
> > On Mon, Oct 03, 2011 at 04:10:50PM +0530, Aneesh Kumar K.V wrote:
> > > On Mon, 3 Oct 2011 08:37:52 +0100, Stefan Hajnoczi <stefanha@gmail.com> wrote:
> > > > On Sat, Oct 01, 2011 at 03:03:23PM +0530, Aneesh Kumar K.V wrote:
> > > > > +#ifndef CONFIG_UTIMENSAT
> > > > > + /*
> > > > > + * We support handle fs driver only if all related
> > > > > + * syscalls are provided by host.
> > > > > + */
> > > >
> > > > Perhaps a ./configure check should be added to see whether the handle
> > > > syscalls are supported instead of using CONFIG_UTIMENSAT.
> > > >
> > >
> > > We already do check for handle syscall. Since glibc doesn't have the
> > > this syscall yet, I added the check in virtio-9p-handle.c as below
> >
> > CONFIG_UTIMENSAT is defined when the host has glibc >= 2.6.
> >
> > Handle syscalls are available on Linux 2.6.39 but not exposed by glibc.
> >
> > Therefore CONFIG_UTIMENSAT has nothing to do with handle syscalls and
> > does not mean handle syscalls are supported. I would drop that hunk of
> > the patch or test for the actual handle syscalls in ./configure.
>
> Here is what i am trying to achieve with the patch. For handle based fs
> driver to work we need to have
>
> 1) support for handle syscall
> 2) support for fd based syscalls like futimens, fstatat, readlinkat,
> fchmod, fchownat, openat etc.
>
> Now handle syscalls are recently added to kernel and glibc doesn't have
> support for that. So what we did is to add handle syscall in
> virtio-9p-handle.c via syscall(2). Now if the syscall is not supported
> by the host kernel we will get ENOSYS. I only added support for i386 and
> x86_64, because most the syscall number varies with different archs. For
> other archs the wrapper returns ENOSYS. So instead of checking for
> handle syscalls in configure script we did the above to make sure it
> work without failure in most of the case. Once we have glibc support for
> handle syscall the above changes should be dropped in favor of
> configure script test.
>
> Now for the fd based syscall dependency, we didn't initially had any
> check for that because my expectation was most glibc should
> have support for them. But RHEL 5 build failure indicate that futimens
> is not supported. We were already checking for futimens in configure so
> i added changes to make sure if futimens is not supported
> handle_utimensat returns error. (That was not added as a run time
> check, but rather a compile error fix). Now should we allow handle based fs
> driver if futimens is not supported. I was suggesting we should not;
> hence the check in init to return error when we don't support
> futimens. The later part of init routine do check whether handle
> syscalls are supported and disable handle fs driver if they are not.
Okay, then the comment should be:
/*
* We support handle fs driver only if futimens is provided by the host
*/
The scenario where it might be possible to hit the CONFIG_UTIMENSAT is
with a modern kernel paired with an old userspace. The handle syscall
which we call directly would succeed but the futimens(2) would not be
available.
On a sane system the handle syscall fails because the kernel doesn't
support it (and futimens isn't there either).
Stefan
next prev parent reply other threads:[~2011-10-04 10:29 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-29 23:28 [Qemu-devel] buildbot failure in qemu on default_x86_64_rhel5 qemu
2011-09-30 8:26 ` Stefan Hajnoczi
2011-10-01 8:58 ` Aneesh Kumar K.V
2011-10-01 9:33 ` Aneesh Kumar K.V
2011-10-03 7:37 ` Stefan Hajnoczi
2011-10-03 10:40 ` Aneesh Kumar K.V
2011-10-04 7:18 ` Stefan Hajnoczi
2011-10-04 8:48 ` Aneesh Kumar K.V
2011-10-04 10:29 ` Stefan Hajnoczi [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-12-13 22:27 qemu
2012-05-14 23:58 qemu
2012-02-26 0:07 qemu
2011-12-13 0:06 qemu
2011-11-23 0:09 qemu
2011-11-22 23:53 ` Alexander Graf
2011-11-23 8:36 ` Stefan Hajnoczi
2011-09-05 23:24 qemu
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=20111004102938.GA32199@stefanha-thinkpad.localdomain \
--to=stefanha@gmail.com \
--cc=agraf@suse.de \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=gollub@b1-systems.de \
--cc=lcapitulino@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).