History

erofs: leave compressed inodes unsupported in fscache mode for now

erofs over fscache doesn't support the compressed layout yet. It will cause NULL crash if there are compressed inodes contained when working in fscache mode. So far in the erofs based container image distribution scenarios (RAFS v6), the compressed RAFS v6 images are downloaded and then decompressed on demand as an uncompressed erofs image. Then the erofs image is mounted in fscache mode for containers to use. IOWs, currently compressed data is decompressed on the userspace side instead and uncompressed erofs images will be finally cached. The fscache support for the compressed layout is still under development and it will be used for runtime decompression feature. Anyway, to avoid the potential crash, let's leave the compressed inodes unsupported in fscache mode until we support it later.

Jeffle Xu committed 4 years ago

Commit 0130e4e1 parent 65965d91 file · +4 −1Browse files

Unified · Split

fs/erofs/inode.c+4−1
@@ -288,7 +288,10 @@ static int erofs_fill_inode(struct inode *inode, int isdir) · 287 unmodified lines
288288 }
289289
290290 if (erofs_inode_is_data_compressed(vi->datalayout)) {
291− err = z_erofs_fill_inode(inode);
291+ if (!erofs_is_fscache_mode(inode->i_sb))
292+ err = z_erofs_fill_inode(inode);
293+ else
294+ err = -EOPNOTSUPP;
292295 goto out_unlock;
293296 }
294297 inode->i_mapping->a_ops = &erofs_raw_access_aops;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t