public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Yann Droneaud <ydroneaud@opteya.com>
To: Ben Myers <bpm@sgi.com>
Cc: ydroneaud@opteya.com, linux-kernel@vger.kernel.org, xfs@oss.sgi.com
Subject: Re: [PATCH 10/13] xfs: use get_unused_fd_flags(0) instead of get_unused_fd()
Date: Wed, 10 Jul 2013 12:00:57 +0200	[thread overview]
Message-ID: <70a3a6971c3127226563e9538ae53bec@meuh.org> (raw)
In-Reply-To: <20130709205321.GV20932@sgi.com>

Hi,

Le 09.07.2013 22:53, Ben Myers a écrit :
> On Mon, Jul 08, 2013 at 05:41:33PM -0500, Ben Myers wrote:
>> On Tue, Jul 02, 2013 at 06:39:34PM +0200, Yann Droneaud wrote:

>> > diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
>> > index 5e99968..dc5b659 100644
>> > --- a/fs/xfs/xfs_ioctl.c
>> > +++ b/fs/xfs/xfs_ioctl.c
>> > @@ -248,7 +248,7 @@ xfs_open_by_handle(
>> >  		goto out_dput;
>> >  	}
>> >
>> > -	fd = get_unused_fd();
>> > +	fd = get_unused_fd_flags(0);
>> 
>> O_CLOEXEC should be fine in this case.
>> 
>> Reviewed-by: Ben Myers <bpm@sgi.com>
> 
> Applied at git://oss.sgi.com/xfs/xfs.git.  Looks like I was wrong about
> O_CLOEXEC being ok here.  There may be applications which 
> open_by_handle then
> fork/exec and expect to still be able to use that file descriptor.
> 

OK, it's very important to not cause regression here.

For the record, xfs_open_by_handle() is not related to 
open_by_handle_at() syscall.

It's an ioctl (XFS_IOC_OPEN_BY_HANDLE) which is used by xfsprogs's 
libhandle
in functions open_by_fshandle() and open_by_handle().

http://sources.debian.net/src/xfsprogs/3.1.9/libhandle/handle.c?hl=284#L284
http://sources.debian.net/src/xfsprogs/3.1.9/libhandle/handle.c?hl=308#L308

According to codesearch.debian.org, libhandle's open_by_handle() is only 
used
by xfsdump

http://sources.debian.net/src/xfsdump/3.1.1/restore/tree.c?hl=2534#L2534

So there's no many *known* users of this features ... but it's more 
important
not to break *unknown* users of it.

BTW, thanks for the review and applying.

Regards.

-- 
Yann Droneaud
OPTEYA

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2013-07-10 10:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-02 16:39 [PATCH 00/13] Getting rid of get_unused_fd() Yann Droneaud
2013-07-02 16:39 ` [PATCH 10/13] xfs: use get_unused_fd_flags(0) instead " Yann Droneaud
2013-07-08 22:41   ` Ben Myers
2013-07-09 20:53     ` Ben Myers
2013-07-10 10:00       ` Yann Droneaud [this message]
2013-07-11  0:36         ` Dave Chinner

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=70a3a6971c3127226563e9538ae53bec@meuh.org \
    --to=ydroneaud@opteya.com \
    --cc=bpm@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xfs@oss.sgi.com \
    /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