All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Anand Jain <anand.jain@oracle.com>
Cc: dsterba@suse.cz, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH RESEND v12] btrfs: introduce feature to forget a btrfs device
Date: Thu, 3 Jan 2019 15:37:22 +0100	[thread overview]
Message-ID: <20190103143722.GG23615@twin.jikos.cz> (raw)
In-Reply-To: <ac8541d7-53e8-74c7-1c45-1cbbf86b8710@oracle.com>

On Thu, Jan 03, 2019 at 03:54:26PM +0800, Anand Jain wrote:
> > I think this should reflect the status of the operation. The ioctl
> > caller has no information about success/error. Eg. an invalid device
> > path passed could return -ENOENT, 0 if it was released and 1 if not.
> > 
> > In case of all devices, it's probably ok to return 0.
> 
> OK. v13 will return error if the given device is not found,
> and I find ENXIO is more suitable (instead of ENOENT).
> If you disagree pls can you make the changes as in [1]
> when integrating. I have tested with both.

ENXIO refers to device nodes, however for paths it should be ok to use
ENOENT, same what would eg. stat return on the given device path.

The ENXIO is used for lseek and is documented as such, I'd rather stick
to semantics of 'file' even though it's a path to a device.

  reply	other threads:[~2019-01-03 14:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-02  5:49 [PATCH RESEND v12] Add cli and ioctl to forget scanned device(s) Anand Jain
2019-01-02  5:49 ` [PATCH RESEND v12] btrfs: introduce feature to forget a btrfs device Anand Jain
2019-01-02 16:00   ` David Sterba
2019-01-03  7:54     ` Anand Jain
2019-01-03 14:37       ` David Sterba [this message]
2019-01-02  5:49 ` [PATCH RESEND v12] btrfs-progs: add cli to forget one or all scanned devices Anand Jain
  -- strict thread matches above, loose matches on Subject: below --
2018-12-17 15:08 [PATCH RESEND v12] Add cli and ioctl to forget scanned device(s) Anand Jain
2018-12-17 15:08 ` [PATCH RESEND v12] btrfs: introduce feature to forget a btrfs device Anand Jain
2018-11-30  8:52 [PATCH RESEND v12] Add cli and ioctl to forget scanned device(s) Anand Jain
2018-11-30  8:52 ` [PATCH RESEND v12] btrfs: introduce feature to forget a btrfs device Anand Jain

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=20190103143722.GG23615@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=anand.jain@oracle.com \
    --cc=linux-btrfs@vger.kernel.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.