* [PATCH] Btrfs: fix error number in send.c
@ 2016-01-22 0:13 Tsutomu Itoh
2016-01-22 14:00 ` David Sterba
0 siblings, 1 reply; 4+ messages in thread
From: Tsutomu Itoh @ 2016-01-22 0:13 UTC (permalink / raw)
To: linux-btrfs
ENOTSUPP should not be returned to the user program.
(cf. include/linux/errno.h)
Therefore, EOPNOTSUPP is used instead of ENOTSUPP.
Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
---
fs/btrfs/send.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c
index 63a6152..b4229e8 100644
--- a/fs/btrfs/send.c
+++ b/fs/btrfs/send.c
@@ -2576,7 +2576,7 @@ verbose_printk("btrfs: send_create_inode %llu\n", ino);
} else {
btrfs_warn(sctx->send_root->fs_info, "unexpected inode type %o",
(int)(mode & S_IFMT));
- ret = -ENOTSUPP;
+ ret = -EOPNOTSUPP;
goto out;
}
--
2.6.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Btrfs: fix error number in send.c
2016-01-22 0:13 [PATCH] Btrfs: fix error number in send.c Tsutomu Itoh
@ 2016-01-22 14:00 ` David Sterba
2016-01-25 2:23 ` Tsutomu Itoh
0 siblings, 1 reply; 4+ messages in thread
From: David Sterba @ 2016-01-22 14:00 UTC (permalink / raw)
To: Tsutomu Itoh; +Cc: linux-btrfs
On Fri, Jan 22, 2016 at 09:13:25AM +0900, Tsutomu Itoh wrote:
> ENOTSUPP should not be returned to the user program.
> (cf. include/linux/errno.h)
> Therefore, EOPNOTSUPP is used instead of ENOTSUPP.
I'm not sure that EOPNOTSUPP is the right error code here. I'd rather
make it EINVAL, the bug we're talking about is a new type of inode
outside of the S_IFMT bits. "not supported" would mean we don't support
it but we could in theory.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Btrfs: fix error number in send.c
2016-01-22 14:00 ` David Sterba
@ 2016-01-25 2:23 ` Tsutomu Itoh
2016-01-26 13:01 ` David Sterba
0 siblings, 1 reply; 4+ messages in thread
From: Tsutomu Itoh @ 2016-01-25 2:23 UTC (permalink / raw)
To: dsterba; +Cc: linux-btrfs
Hi, David,
On 2016/01/22 23:00, David Sterba wrote:
> On Fri, Jan 22, 2016 at 09:13:25AM +0900, Tsutomu Itoh wrote:
>> ENOTSUPP should not be returned to the user program.
>> (cf. include/linux/errno.h)
>> Therefore, EOPNOTSUPP is used instead of ENOTSUPP.
>
> I'm not sure that EOPNOTSUPP is the right error code here. I'd rather
> make it EINVAL, the bug we're talking about is a new type of inode
> outside of the S_IFMT bits. "not supported" would mean we don't support
> it but we could in theory.
Thanks for review.
In the meaning that btrfs-send is not supporting a new type of inode now,
EOPNOTSUPP is acceptable, I think.
Thanks,
Tsutomu
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Btrfs: fix error number in send.c
2016-01-25 2:23 ` Tsutomu Itoh
@ 2016-01-26 13:01 ` David Sterba
0 siblings, 0 replies; 4+ messages in thread
From: David Sterba @ 2016-01-26 13:01 UTC (permalink / raw)
To: Tsutomu Itoh; +Cc: dsterba, linux-btrfs
On Mon, Jan 25, 2016 at 11:23:51AM +0900, Tsutomu Itoh wrote:
> Hi, David,
>
> On 2016/01/22 23:00, David Sterba wrote:
> > On Fri, Jan 22, 2016 at 09:13:25AM +0900, Tsutomu Itoh wrote:
> >> ENOTSUPP should not be returned to the user program.
> >> (cf. include/linux/errno.h)
> >> Therefore, EOPNOTSUPP is used instead of ENOTSUPP.
> >
> > I'm not sure that EOPNOTSUPP is the right error code here. I'd rather
> > make it EINVAL, the bug we're talking about is a new type of inode
> > outside of the S_IFMT bits. "not supported" would mean we don't support
> > it but we could in theory.
>
> Thanks for review.
>
> In the meaning that btrfs-send is not supporting a new type of inode now,
> EOPNOTSUPP is acceptable, I think.
It is, there's a warning message printed anyway, the actual error code
does not matter much.
Reviewed-by: David Sterba <dsterba@suse.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-01-26 13:01 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-22 0:13 [PATCH] Btrfs: fix error number in send.c Tsutomu Itoh
2016-01-22 14:00 ` David Sterba
2016-01-25 2:23 ` Tsutomu Itoh
2016-01-26 13:01 ` David Sterba
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.