All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Yann Droneaud <ydroneaud@opteya.com>
Cc: Ben Myers <bpm@sgi.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: Thu, 11 Jul 2013 10:36:29 +1000	[thread overview]
Message-ID: <20130711003629.GS3438@dastard> (raw)
In-Reply-To: <70a3a6971c3127226563e9538ae53bec@meuh.org>

On Wed, Jul 10, 2013 at 12:00:57PM +0200, Yann Droneaud wrote:
> 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.

There are commercial products (i.e. proprietary, closed source) that
use it. SGI has one (DMF) and there are a couple of other backup
programs that have used it in the past, too.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

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

WARNING: multiple messages have this Message-ID (diff)
From: Dave Chinner <david@fromorbit.com>
To: Yann Droneaud <ydroneaud@opteya.com>
Cc: Ben Myers <bpm@sgi.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: Thu, 11 Jul 2013 10:36:29 +1000	[thread overview]
Message-ID: <20130711003629.GS3438@dastard> (raw)
In-Reply-To: <70a3a6971c3127226563e9538ae53bec@meuh.org>

On Wed, Jul 10, 2013 at 12:00:57PM +0200, Yann Droneaud wrote:
> 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.

There are commercial products (i.e. proprietary, closed source) that
use it. SGI has one (DMF) and there are a couple of other backup
programs that have used it in the past, too.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

  reply	other threads:[~2013-07-11  0:36 UTC|newest]

Thread overview: 42+ 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 ` Yann Droneaud
2013-07-02 16:39 ` Yann Droneaud
2013-07-02 16:39 ` [PATCH 01/13] ia64: use get_unused_fd_flags(0) instead " Yann Droneaud
2013-07-02 16:39   ` Yann Droneaud
2013-07-02 16:39 ` [PATCH 02/13] ppc/cell: " Yann Droneaud
2014-01-12 23:06   ` Benjamin Herrenschmidt
2014-01-12 23:06     ` Benjamin Herrenschmidt
2014-01-13  9:30     ` Yann Droneaud
2014-01-13  9:30       ` Yann Droneaud
2014-01-20 17:01       ` Yann Droneaud
2014-01-20 17:01         ` Yann Droneaud
2013-07-02 16:39 ` [PATCH 03/13] infiniband: " Yann Droneaud
     [not found]   ` <651e35493f6a970610d35785e1972ec9e2426abf.1372777600.git.ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
2013-07-08 18:23     ` Roland Dreier
2013-07-08 18:23       ` Roland Dreier
2013-07-08 21:26       ` Yann Droneaud
2013-07-02 16:39 ` [PATCH 04/13] android/sw_sync: " Yann Droneaud
2013-07-02 22:22   ` Erik Gilling
2013-07-02 16:39 ` [PATCH 05/13] android/sync: " Yann Droneaud
2013-07-02 22:22   ` Erik Gilling
2013-07-02 16:39 ` [PATCH 06/13] vfio: " Yann Droneaud
2013-07-02 16:39 ` [PATCH 07/13] binfmt_misc: " Yann Droneaud
2013-07-02 16:39 ` [PATCH 08/13] file: " Yann Droneaud
2013-07-02 16:39 ` [PATCH 09/13] fanotify: " Yann Droneaud
2013-07-02 16:39 ` [PATCH 10/13] xfs: " Yann Droneaud
2013-07-02 16:39   ` Yann Droneaud
2013-07-08 22:41   ` Ben Myers
2013-07-08 22:41     ` Ben Myers
2013-07-09 20:53     ` Ben Myers
2013-07-09 20:53       ` Ben Myers
2013-07-10 10:00       ` Yann Droneaud
2013-07-10 10:00         ` Yann Droneaud
2013-07-11  0:36         ` Dave Chinner [this message]
2013-07-11  0:36           ` Dave Chinner
2013-07-02 16:39 ` [PATCH 11/13] events: " Yann Droneaud
2013-07-02 16:39 ` [PATCH 12/13] sctp: " Yann Droneaud
2013-07-02 16:39   ` Yann Droneaud
2013-07-02 17:50   ` Vlad Yasevich
2013-07-02 17:50     ` Vlad Yasevich
2013-07-02 23:14     ` David Miller
2013-07-02 23:14       ` David Miller
2013-07-02 16:39 ` [PATCH 13/13] file: remove get_unused_fd() Yann Droneaud

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=20130711003629.GS3438@dastard \
    --to=david@fromorbit.com \
    --cc=bpm@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xfs@oss.sgi.com \
    --cc=ydroneaud@opteya.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 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.