From: Dave Chinner <david@fromorbit.com>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: Eric Sandeen <sandeen@redhat.com>, linux-xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH 5/5] xfs_io: add label command
Date: Wed, 16 May 2018 10:57:00 +1000 [thread overview]
Message-ID: <20180516005700.GM23861@dastard> (raw)
In-Reply-To: <d5db1a4e-4efe-30cb-4c8d-0a32f1f50a94@sandeen.net>
On Tue, May 15, 2018 at 10:06:53AM -0500, Eric Sandeen wrote:
>
>
> On 5/14/18 11:32 PM, Dave Chinner wrote:
> >On Mon, May 14, 2018 at 12:43:20PM -0500, Eric Sandeen wrote:
> >>This adds a get/set label command to xfs_io.
> >....
> >>+static int
> >>+label_f(
> >>+ int argc,
> >>+ char **argv)
> >>+{
> >>+ int error;
> >>+ char label[FSLABEL_MAX];
> >>+
> >>+ if (argc == 1) {
> >>+ memset(&label, 0, sizeof(label));
> >>+ error = ioctl(file->fd, FS_IOC_GET_FSLABEL, &label);
> >>+ } else {
> >>+ strncpy(label, argv[1], sizeof(label));
> >>+ error = ioctl(file->fd, FS_IOC_SET_FSLABEL, &label);
> >>+ }
> >>+
> >>+ if (error)
> >>+ perror("label");
> >
> >Need to set exitcode = 1 here so that xfs_io fails with a non-zero
> >exit status....
> >
> >>+ else
> >>+ printf("label = \"%s\"\n", label);
> >>+
> >>+ return error;
> >
> >Because this isn't the exit status - this is the "continue
> >processing the next command" return value. i.e. return 0 if we want
> >to continue, non-zero if we want to abort further CLI processing....
>
> Hm, ok. Today we only set exitcode for bmap, fiemap, freeze/thaw, and
> imap. It's really consistently used at all, and needs an audit I guess.
You mean the audit I did 6 months ago?
https://www.spinics.net/lists/linux-xfs/msg13605.html
(which is why I know what the exitcode rules are. :)
The patch is still sitting around somewhere here....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
next prev parent reply other threads:[~2018-05-16 0:57 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-14 17:30 [PATCH V2 0/5] xfs: online label Eric Sandeen
2018-05-14 17:35 ` [PATCH V2 1/5] fs: copy BTRFS_IOC_[SG]ET_FSLABEL to vfs Eric Sandeen
2018-05-14 17:37 ` Darrick J. Wong
2018-05-14 17:36 ` [PATCH 2/4] xfs: New function for secondary superblock updates Eric Sandeen
2018-05-15 20:17 ` Darrick J. Wong
2018-05-14 17:39 ` [PATCH 3/5 V2] xfs: implement online get/set fs label Eric Sandeen
2018-05-15 1:07 ` Darrick J. Wong
2018-05-16 1:04 ` Darrick J. Wong
2018-05-14 17:42 ` [PATCH 4/5] btrfs: use common label ioctl definitions Eric Sandeen
2018-05-14 21:41 ` Darrick J. Wong
2018-05-14 17:43 ` [PATCH 5/5] xfs_io: add label command Eric Sandeen
2018-05-15 4:32 ` Dave Chinner
2018-05-15 15:06 ` Eric Sandeen
2018-05-16 0:57 ` Dave Chinner [this message]
2018-05-15 15:32 ` [PATCH 5/5 V2] " Eric Sandeen
2018-05-15 20:12 ` Darrick J. Wong
2018-05-17 15:22 ` [PATCH 5/5 V3] " Eric Sandeen
2018-05-17 21:56 ` Dave Chinner
-- strict thread matches above, loose matches on Subject: below --
2018-04-30 15:40 [PATCH 0/5] xfs: add online relabel capabilities Eric Sandeen
2018-04-30 15:48 ` [PATCH 5/5] xfs_io: add label command Eric Sandeen
2018-05-02 14:37 ` Darrick J. Wong
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=20180516005700.GM23861@dastard \
--to=david@fromorbit.com \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@redhat.com \
--cc=sandeen@sandeen.net \
/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).