[PATCH v2 2/2] erofs: support reading chunk-based uncompressed files
Gao Xiang
hsiangkao at linux.alibaba.com
Thu Aug 19 17:12:12 AEST 2021
Hi Joseph,
On Thu, Aug 19, 2021 at 02:37:50PM +0800, Joseph Qi wrote:
>
>
> On 8/19/21 2:33 PM, Gao Xiang wrote:
...
> > diff --git a/fs/erofs/inode.c b/fs/erofs/inode.c
> > index d13e0709599c..4408929bd6f5 100644
> > --- a/fs/erofs/inode.c
> > +++ b/fs/erofs/inode.c
> > @@ -2,6 +2,7 @@
> > /*
> > * Copyright (C) 2017-2018 HUAWEI, Inc.
> > * https://www.huawei.com/
> > + * Copyright (C) 2021, Alibaba Cloud
> > */
> > #include "xattr.h"
> >
> > @@ -122,7 +123,9 @@ static struct page *erofs_read_inode(struct inode *inode,
> > /* total blocks for compressed files */
> > if (erofs_inode_is_data_compressed(vi->datalayout))
> > nblks = le32_to_cpu(die->i_u.compressed_blocks);
> > -
> > + else if (vi->datalayout == EROFS_INODE_CHUNK_BASED)
> > + /* fill chunked inode summary info */
> > + vi->chunkformat = le16_to_cpu(die->i_u.c.format);
>
> Better to add braces for if/else.
Thanks for the kind suggestion. Here is single statement, I've checked
coding-style in Documentation. It's no necessary to use brace for this.
And checkpatch didn't report anything.
Also, I found some reference at
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/mm/vmscan.c?h=v5.13#n3066
But anyway, I could update it when applying, either looks good to me.
Thanks,
Gao Xiang
More information about the Linux-erofs
mailing list