Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* Hard link not persisted on fsync
@ 2018-04-16 14:35 Jayashree Mohan
  2018-04-18  0:02 ` Jayashree Mohan
  2018-04-19 21:41 ` Zygo Blaxell
  0 siblings, 2 replies; 5+ messages in thread
From: Jayashree Mohan @ 2018-04-16 14:35 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Vijaychidambaram Velayudhan Pillai

Hi,

The following seems to be a crash consistency bug on btrfs, where in
the link count is not persisted even after a fsync on the original
file.

Consider the following workload :
creat foo
link (foo, A/bar)
fsync(foo)
---Crash---

Now, on recovery we expect the metadata of foo to be persisted i.e
have a link count of 2. However in btrfs, the link count is 1 and file
A/bar is not persisted. The expected behaviour would be to persist the
dependencies of inode foo. That is to say, shouldn't fsync of foo
persist A/bar and correctly update the link count?
Note that ext4, xfs and f2fs recover to the correct link count of 2
for the above workload.

Let us know what you think about this behavior.

Thanks,
Jayashree Mohan

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

end of thread, other threads:[~2018-04-20 11:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-16 14:35 Hard link not persisted on fsync Jayashree Mohan
2018-04-18  0:02 ` Jayashree Mohan
2018-04-18  8:34   ` Filipe Manana
2018-04-19 21:41 ` Zygo Blaxell
2018-04-20 11:37   ` Jayashree Mohan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox