Re: [f2fs-dev] [PATCH v2 2/2] f2fs: add F2FS_IOC_SET_COMPRESS_OPTION ioctl

2020-10-21 Thread Daeho Jeong
> The use of ?: here is a bit strange. How about: > > return algorithm < COMPRESS_MAX && f2fs_cops[algorithm] != NULL; > Ack > Likewise, EINVAL tends to be over-used, which makes it ambiguous. Maybe use > ENOPKG for the case where algorithm < COMPRESS_MAX but the algorithm wasn't >

Re: [f2fs-dev] [PATCH v2 2/2] f2fs: add F2FS_IOC_SET_COMPRESS_OPTION ioctl

2020-10-21 Thread Eric Biggers
On Thu, Oct 22, 2020 at 12:58:48PM +0900, Daeho Jeong wrote: > diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c > index 7895186cc765..3b58a41223f8 100644 > --- a/fs/f2fs/compress.c > +++ b/fs/f2fs/compress.c > @@ -514,6 +514,11 @@ bool f2fs_is_compress_backend_ready(struct inode *inode) >