erofs: relax the constraint of non-empty device tag in flatdev mode
PATCH RESEND 1/1 erofs: relax the constraint of non-empty device tag in flatdev mode
The device tag is not required in flatdev mode, and thus relax this constraint in flatdev mode.
Signed-off-by Jingbo Xu <[email protected]>
---
Sorry I forget to cc [email protected] in the former patch.
--- fs/erofs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/erofs/super.c +1 -1
@@ -235,7 +235,7 @@ static int erofs_init_device(struct erofs_buf *buf, struct super_block *sb,return PTR_ERR (ptr); dis = ptr +erofs_blkoff (sb, *pos); -if (!dif->path) { +if (!sbi->devs->flatdev && !dif->path) {if (!dis->tag[0 ]) {erofs_err (sb,"empty device tag @ pos %llu" , *pos);return -EINVAL ;
Signature · 1 line
2.19.1.6.gb485710b
Quoted 4 lines · Jingbo Xu
The device tag is not required in flatdev mode, and thus relax this constraint in flatdev mode.
Signed-off-by Jingbo Xu <[email protected]>
LGTM
Reviewed-by Jia Zhu <[email protected]>
Quoted 19 lines
---
Sorry I forget to cc [email protected] in the former patch.--- fs/erofs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/erofs/super.c +1
-1@@ -235,7 +235,7 @@ static int erofs_init_device(struct erofs_buf *buf, struct super_block *sb,return PTR_ERR (ptr); dis = ptr +erofs_blkoff (sb, *pos); -if (!dif->path) { +if (!sbi->devs->flatdev && !dif->path) {if (!dis->tag[0 ]) {erofs_err (sb,"empty device tag @ pos %llu" , *pos);return -EINVAL ;
Quoted 4 lines · Jingbo Xu
The device tag is not required in flatdev mode, and thus relax this constraint in flatdev mode.
Signed-off-by Jingbo Xu <[email protected]>
I tend to update the subject title and commit message as a fix:
erofs: allow empty device tags in flatdev mode
Device tags aren't actually required in flatdev mode, thus fix mount failure due to empty device tags in flatdev mode.
Fixes 8b465fecc35a ("erofs: support flattened block device for multi-blob images")
Reviewed-by Gao Xiang <[email protected]>
Thanks,
Gao Xiang