-
Bug
-
Resolution: Unresolved
-
Medium
-
None
-
None
-
3
-
9223372036854775807
On a server with PAGE_SIZE > 4096, the MGS can corrupt a config llog after mgs_replace_log() rewrites it (lctl replace_nids). On the next mount the log fails with "invalid llog tail", the MGS no longer knows the target and MDT0000 fails to mount with -ENOENT. conf-sanity 66 and 162 hit it every time on 64KiB pages.
When the object leaves the cache, osd_drop_preallocated_space() truncates the preallocated blocks. ldiskfs_truncate() zeroes the tail of the last partial block through the inode's page cache, reading the block from disk, while the llog data was written through block device buffers and is not on disk yet. The journaled stale block then overwrites the new records at checkpoint. The jbd buffers are dropped to prevent this, but only when(i_size & PAGE_MASK) != 0, so every llog smaller than a 64KiB page skips it.