All of lore.kernel.org
 help / color / mirror / Atom feed
* Strange behavior (possible bugs) in btrfs
@ 2018-04-30 16:04 Vijay Chidambaram
  2018-04-30 16:51 ` Jeff Mahoney
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Vijay Chidambaram @ 2018-04-30 16:04 UTC (permalink / raw)
  To: Linux Btrfs, Soujanya Ponnapalli, Jayashree Mohan

Hi,

We found two more cases where the btrfs behavior is a little strange.
In one case, an fsync-ed file goes missing after a crash. In the
other, a renamed file shows up in both directories after a crash.

Workload 1:

mkdir A
mkdir B
mkdir A/C
creat B/foo
fsync B/foo
link B/foo A/C/foo
fsync A
-- crash --

Expected state after recovery:
B B/foo A A/C exist

What we find:
Only B B/foo exist

A is lost even after explicit fsync to A.

Workload 2:

mkdir A
mkdir A/C
rename A/C B
touch B/bar
fsync B/bar
rename B/bar A/bar
rename A B (replacing B with A at this point)
fsync B/bar
-- crash --

Expected contents after recovery:
A/bar

What we find after recovery:
A/bar
B/bar

We think this breaks rename's atomicity guarantee. bar should be
present in either A or B, but now it is present in both.

Thanks,
Vijay

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

end of thread, other threads:[~2018-08-29 12:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-30 16:04 Strange behavior (possible bugs) in btrfs Vijay Chidambaram
2018-04-30 16:51 ` Jeff Mahoney
2018-04-30 16:56   ` Jayashree Mohan
2018-05-02 22:50     ` Vijay Chidambaram
2018-05-11 15:45 ` Filipe Manana
2018-08-28 20:35   ` Jayashree Mohan
2018-08-29  8:56     ` Filipe Manana
2018-05-23 10:44 ` Filipe Manana

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.