* [PATCH] staging: erofs: don't check special inode layout @ 2019-06-28 3:42 Yue Hu 2019-06-28 3:50 ` Gao Xiang 0 siblings, 1 reply; 4+ messages in thread From: Yue Hu @ 2019-06-28 3:42 UTC (permalink / raw) To: gaoxiang25, yuchao0, gregkh; +Cc: linux-erofs, devel, linux-kernel, huyue2 From: Yue Hu <huyue2@yulong.com> Currently, we will check if inode layout is compression or inline if the inode is special in fill_inode(). Also set ->i_mapping->a_ops for it. That is pointless since the both modes won't be set for special inode when creating EROFS filesystem image. So, let's avoid it. Signed-off-by: Yue Hu <huyue2@yulong.com> --- drivers/staging/erofs/inode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/erofs/inode.c b/drivers/staging/erofs/inode.c index 1433f25..2fe0f6d 100644 --- a/drivers/staging/erofs/inode.c +++ b/drivers/staging/erofs/inode.c @@ -205,6 +205,7 @@ static int fill_inode(struct inode *inode, int isdir) S_ISFIFO(inode->i_mode) || S_ISSOCK(inode->i_mode)) { inode->i_op = &erofs_generic_iops; init_special_inode(inode, inode->i_mode, inode->i_rdev); + goto out_unlock; } else { err = -EIO; goto out_unlock; -- 1.9.1 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: erofs: don't check special inode layout 2019-06-28 3:42 [PATCH] staging: erofs: don't check special inode layout Yue Hu @ 2019-06-28 3:50 ` Gao Xiang 2019-06-28 4:19 ` Yue Hu 0 siblings, 1 reply; 4+ messages in thread From: Gao Xiang @ 2019-06-28 3:50 UTC (permalink / raw) To: Yue Hu, yuchao0, gregkh Cc: linux-erofs, devel, linux-kernel, huyue2, Miao Xie Hi Yue, On 2019/6/28 11:42, Yue Hu wrote: > From: Yue Hu <huyue2@yulong.com> > > Currently, we will check if inode layout is compression or inline if > the inode is special in fill_inode(). Also set ->i_mapping->a_ops for > it. That is pointless since the both modes won't be set for special > inode when creating EROFS filesystem image. So, let's avoid it. > > Signed-off-by: Yue Hu <huyue2@yulong.com> Have you test this patch with some actual image with legacy mkfs since new mkfs framework have not supported special inode... I think that is fine in priciple, however, in case to introduce some potential issues, I will test this patch later. I will give a Reviewed-by tag after I tested this patch. Thanks, Gao Xiang > --- > drivers/staging/erofs/inode.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/staging/erofs/inode.c b/drivers/staging/erofs/inode.c > index 1433f25..2fe0f6d 100644 > --- a/drivers/staging/erofs/inode.c > +++ b/drivers/staging/erofs/inode.c > @@ -205,6 +205,7 @@ static int fill_inode(struct inode *inode, int isdir) > S_ISFIFO(inode->i_mode) || S_ISSOCK(inode->i_mode)) { > inode->i_op = &erofs_generic_iops; > init_special_inode(inode, inode->i_mode, inode->i_rdev); > + goto out_unlock; > } else { > err = -EIO; > goto out_unlock; > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: erofs: don't check special inode layout 2019-06-28 3:50 ` Gao Xiang @ 2019-06-28 4:19 ` Yue Hu 2019-06-29 8:38 ` Chao Yu 0 siblings, 1 reply; 4+ messages in thread From: Yue Hu @ 2019-06-28 4:19 UTC (permalink / raw) To: Gao Xiang Cc: yuchao0, gregkh, linux-erofs, devel, linux-kernel, huyue2, Miao Xie On Fri, 28 Jun 2019 11:50:21 +0800 Gao Xiang <gaoxiang25@huawei.com> wrote: > Hi Yue, > > On 2019/6/28 11:42, Yue Hu wrote: > > From: Yue Hu <huyue2@yulong.com> > > > > Currently, we will check if inode layout is compression or inline if > > the inode is special in fill_inode(). Also set ->i_mapping->a_ops for > > it. That is pointless since the both modes won't be set for special > > inode when creating EROFS filesystem image. So, let's avoid it. > > > > Signed-off-by: Yue Hu <huyue2@yulong.com> > > Have you test this patch with some actual image with legacy mkfs since > new mkfs framework have not supported special inode... Hi Xiang, I'm studying the testing :) However, already check the code handling for special inode in leagcy mkfs as below: ```c break; case EROFS_FT_BLKDEV: case EROFS_FT_CHRDEV: case EROFS_FT_FIFO: case EROFS_FT_SOCK: mkfs_rank_inode(d); break; default: erofs_err("inode[%s] file_type error =%d", d->i_fullpath, ``` No special inode layout operations, so this change should be fine. Thx. > > I think that is fine in priciple, however, in case to introduce some potential > issues, I will test this patch later. I will give a Reviewed-by tag after I tested > this patch. Thanks. > > Thanks, > Gao Xiang > > > --- > > drivers/staging/erofs/inode.c | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/drivers/staging/erofs/inode.c b/drivers/staging/erofs/inode.c > > index 1433f25..2fe0f6d 100644 > > --- a/drivers/staging/erofs/inode.c > > +++ b/drivers/staging/erofs/inode.c > > @@ -205,6 +205,7 @@ static int fill_inode(struct inode *inode, int isdir) > > S_ISFIFO(inode->i_mode) || S_ISSOCK(inode->i_mode)) { > > inode->i_op = &erofs_generic_iops; > > init_special_inode(inode, inode->i_mode, inode->i_rdev); > > + goto out_unlock; > > } else { > > err = -EIO; > > goto out_unlock; > > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: erofs: don't check special inode layout 2019-06-28 4:19 ` Yue Hu @ 2019-06-29 8:38 ` Chao Yu 0 siblings, 0 replies; 4+ messages in thread From: Chao Yu @ 2019-06-29 8:38 UTC (permalink / raw) To: Yue Hu, Gao Xiang Cc: gregkh, linux-erofs, devel, linux-kernel, huyue2, Miao Xie On 2019/6/28 12:19, Yue Hu wrote: > On Fri, 28 Jun 2019 11:50:21 +0800 > Gao Xiang <gaoxiang25@huawei.com> wrote: > >> Hi Yue, >> >> On 2019/6/28 11:42, Yue Hu wrote: >>> From: Yue Hu <huyue2@yulong.com> >>> >>> Currently, we will check if inode layout is compression or inline if >>> the inode is special in fill_inode(). Also set ->i_mapping->a_ops for >>> it. That is pointless since the both modes won't be set for special >>> inode when creating EROFS filesystem image. So, let's avoid it. >>> >>> Signed-off-by: Yue Hu <huyue2@yulong.com> >> >> Have you test this patch with some actual image with legacy mkfs since >> new mkfs framework have not supported special inode... > > Hi Xiang, > > I'm studying the testing :) > > However, already check the code handling for special inode in leagcy mkfs as below: > > ```c > break; > case EROFS_FT_BLKDEV: > case EROFS_FT_CHRDEV: > case EROFS_FT_FIFO: > case EROFS_FT_SOCK: > mkfs_rank_inode(d); > break; > > default: > erofs_err("inode[%s] file_type error =%d", > d->i_fullpath, > ``` > > No special inode layout operations, so this change should be fine. > > Thx. > >> >> I think that is fine in priciple, however, in case to introduce some potential >> issues, I will test this patch later. I will give a Reviewed-by tag after I tested >> this patch. This patch looks good to me, if this won't fail any tests from Xiang, you can add: Reviewed-by: Chao Yu <yuchao0@huawei.com> Thanks, > > Thanks. > >> >> Thanks, >> Gao Xiang >> >>> --- >>> drivers/staging/erofs/inode.c | 1 + >>> 1 file changed, 1 insertion(+) >>> >>> diff --git a/drivers/staging/erofs/inode.c b/drivers/staging/erofs/inode.c >>> index 1433f25..2fe0f6d 100644 >>> --- a/drivers/staging/erofs/inode.c >>> +++ b/drivers/staging/erofs/inode.c >>> @@ -205,6 +205,7 @@ static int fill_inode(struct inode *inode, int isdir) >>> S_ISFIFO(inode->i_mode) || S_ISSOCK(inode->i_mode)) { >>> inode->i_op = &erofs_generic_iops; >>> init_special_inode(inode, inode->i_mode, inode->i_rdev); >>> + goto out_unlock; >>> } else { >>> err = -EIO; >>> goto out_unlock; >>> > > . > ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-06-29 8:38 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-06-28 3:42 [PATCH] staging: erofs: don't check special inode layout Yue Hu 2019-06-28 3:50 ` Gao Xiang 2019-06-28 4:19 ` Yue Hu 2019-06-29 8:38 ` Chao Yu
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
Powered by JetHome