Repository navigation
Commit 3609855
f2fs: separate f2fs i_flags from fs_flags and ext4 i_flags
f2fs copied all the on-disk i_flags from ext4, and along with it the
assumption that the on-disk i_flags are the same as the bits used by
FS_IOC_GETFLAGS and FS_IOC_SETFLAGS. This is problematic because
reserving an on-disk inode flag in either filesystem's i_flags or in
these ioctls effectively reserves it in all the other places too. In
fact, most of the "f2fs i_flags" are not used by f2fs at all.
Fix this by separating f2fs's i_flags from the ioctl bits and ext4's
i_flags.
In the process, un-reserve all "f2fs i_flags" that aren't actually
supported by f2fs. This included various flags that were not settable
at all, as well as various flags that were settable by FS_IOC_SETFLAGS
but didn't actually do anything.
There's a slight chance we'll need to add some flag(s) back to
FS_IOC_SETFLAGS in order to avoid breaking users who expect f2fs to
accept some random flag(s). But hopefully such users don't exist.
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>1 parent 176ef3c commit 3609855
2 files changed
Lines changed: 163 additions & 118 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2334 | 2334 | | |
2335 | 2335 | | |
2336 | 2336 | | |
2337 | | - | |
| 2337 | + | |
2338 | 2338 | | |
2339 | | - | |
2340 | | - | |
2341 | | - | |
2342 | 2339 | | |
2343 | 2340 | | |
2344 | 2341 | | |
2345 | 2342 | | |
2346 | 2343 | | |
2347 | | - | |
2348 | | - | |
2349 | | - | |
2350 | | - | |
2351 | | - | |
2352 | | - | |
2353 | 2344 | | |
2354 | | - | |
2355 | | - | |
2356 | | - | |
2357 | 2345 | | |
2358 | | - | |
2359 | | - | |
2360 | | - | |
2361 | | - | |
2362 | | - | |
2363 | | - | |
2364 | | - | |
2365 | 2346 | | |
2366 | | - | |
2367 | | - | |
2368 | | - | |
2369 | | - | |
2370 | | - | |
2371 | | - | |
2372 | | - | |
2373 | | - | |
2374 | | - | |
2375 | | - | |
2376 | | - | |
2377 | | - | |
2378 | 2347 | | |
2379 | 2348 | | |
2380 | | - | |
2381 | | - | |
2382 | | - | |
2383 | | - | |
2384 | | - | |
| 2349 | + | |
| 2350 | + | |
2385 | 2351 | | |
2386 | 2352 | | |
2387 | | - | |
| 2353 | + | |
2388 | 2354 | | |
2389 | 2355 | | |
2390 | 2356 | | |
| |||
0 commit comments