All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kurz <groug@kaod.org>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-devel@nongnu.org, Leo Gaspard <leo@gaspard.io>
Subject: Re: [Qemu-devel] [PATCH v2 3/4] 9pfs: local: simplify file opening
Date: Tue, 23 May 2017 23:55:38 +0200	[thread overview]
Message-ID: <20170523235538.764a0e24@bahia.ttt.fr.ibm.com> (raw)
In-Reply-To: <73732d9a-e7df-9d33-1293-eafe5553b8dc@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1287 bytes --]

On Tue, 23 May 2017 10:51:26 -0500
Eric Blake <eblake@redhat.com> wrote:

> On 05/23/2017 09:32 AM, Greg Kurz wrote:
> > The logic to open a path currently sits between local_open_nofollow() and
> > the relative_openat_nofollow() helper, which has no other user.
> > 
> > For the sake of clarity, this patch moves all the code of the helper into
> > its unique caller. While here we also:
> > - drop the code to skip leading "/" because the backend isn't supposed to
> >   pass anything but relative paths without consecutive slashes. The assert()
> >   is kept because we really don't want a buggy backend to pass   an absolute  
> 
> odd spacing
> 
> >   path to openat().
> > - use strchrnul() to get a simpler code. This is ok since virtfs if for  
> 
> s/if/is/
> 

Yeah, I spotted these two nits just after posting the series, as usual :)

I'll fix them before merging.

> >   linux+glibc hosts only.
> > - don't dup() the initial directory and add an assert() to ensure we don't
> >   return the global mountfd to the caller. BTW, this would mean that the
> >   caller passed an empty path, which isn't supposed to happen either.
> > 
> > Signed-off-by: Greg Kurz <groug@kaod.org>
> > ---  
> 
> Reviewed-by: Eric Blake <eblake@redhat.com>
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2017-05-23 21:55 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-23 14:32 [Qemu-devel] [PATCH v2 0/4] 9pfs: local: fix metadata of mapped-file security mode Greg Kurz
2017-05-23 14:32 ` [Qemu-devel] [PATCH v2 1/4] 9pfs: check return value of v9fs_co_name_to_path() Greg Kurz
2017-05-23 14:32 ` [Qemu-devel] [PATCH v2 2/4] 9pfs: local: resolve special directories in paths Greg Kurz
2017-05-23 15:49   ` Eric Blake
2017-05-23 14:32 ` [Qemu-devel] [PATCH v2 3/4] 9pfs: local: simplify file opening Greg Kurz
2017-05-23 15:51   ` Eric Blake
2017-05-23 21:55     ` Greg Kurz [this message]
2017-05-23 14:32 ` [Qemu-devel] [PATCH v2 4/4] 9pfs: local: metadata file for the VirtFS root Greg Kurz
2017-05-23 17:13   ` Eric Blake
2017-05-23 18:47     ` Greg Kurz
2017-05-23 23:08     ` Leo Gaspard
2017-05-24  8:44       ` Greg Kurz
2017-05-23 14:47 ` [Qemu-devel] [PATCH v2 0/4] 9pfs: local: fix metadata of mapped-file security mode no-reply
2017-05-23 15:04   ` Greg Kurz
2017-05-23 22:27     ` Fam Zheng
2017-05-23 22:59 ` Leo Gaspard
2017-05-24  8:54   ` Greg Kurz
2017-05-25  0:38     ` Leo Gaspard

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=20170523235538.764a0e24@bahia.ttt.fr.ibm.com \
    --to=groug@kaod.org \
    --cc=eblake@redhat.com \
    --cc=leo@gaspard.io \
    --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.