All of lore.kernel.org
 help / color / mirror / Atom feed
* Directory unremovable on ext4 no_journal mode
@ 2018-04-10  0:08 Jayashree Mohan
  2018-04-10  0:38 ` Darrick J. Wong
  2018-04-10  3:12 ` Theodore Y. Ts'o
  0 siblings, 2 replies; 5+ messages in thread
From: Jayashree Mohan @ 2018-04-10  0:08 UTC (permalink / raw)
  To: linux-ext4, fstests; +Cc: Vijaychidambaram Velayudhan Pillai

Hi,

We stumbled upon what seems to be a bug that makes a “directory
unremovable”,  on ext4 when mounted with no_journal option.

A sequence of operations described below led to the following state :
“A directory that was renamed, was persisted in both parent and target
directories, with the same inode number. This also means the rename
was non-atomic on storage. In addition, the renamed directory becomes
unremovable on the target with FS-error logged in dmesg.”

Here are more details of the workload and the corresponding failure.

Workload :

mkdir /mnt/test/X and /mnt/test/Y
mkdir X/Z
sync()
rename X/Z   Y/Z
fsync Y
—-Crash now—-
Remount
ls X and Y (You will see Z is present in both directories X and Y, and
has same inode)
rmdir test_dir/X/Z  (This succeeds)
rmdir test_dir/Y/Z  (This fails with a FS error logged in dmesg)


Results:

rmdir: failed to remove '/mnt/test/Y/Z': Structure needs cleaning

The corresponding dmesg log has the following error message :
[66799.504124] EXT4-fs error (device cow_ram_snapshot1_0):
ext4_lookup:1576: inode #12: comm rmdir: deleted inode referenced: 14
[66799.504131] EXT4-fs (cow_ram_snapshot1_0): Remounting filesystem read-only

The sequence of operations listed above is making dir Z unremovable
from dir Y, which seems like unexpected behavior. Could you provide
more details on the reason for such behavior? We understand we run
this on no_journal mode of ext4, but would like you to verify if this
behavior is acceptable.

Do let us know if we are missing any detail here.

Thanks,
Jayashree Mohan

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-04-10 12:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-10  0:08 Directory unremovable on ext4 no_journal mode Jayashree Mohan
2018-04-10  0:38 ` Darrick J. Wong
2018-04-10  3:12 ` Theodore Y. Ts'o
2018-04-10  3:21   ` Vijay Chidambaram
2018-04-10 12:07     ` Jayashree Mohan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.