All of lore.kernel.org
 help / color / mirror / Atom feed
* Directory entry not persisted on a fsync
@ 2018-04-20 18:05 Jayashree Mohan
  2018-04-21 17:23 ` Jayashree Mohan
  2018-04-24 14:20 ` Vijay Chidambaram
  0 siblings, 2 replies; 4+ messages in thread
From: Jayashree Mohan @ 2018-04-20 18:05 UTC (permalink / raw)
  To: linux-btrfs, fstests, Vijaychidambaram Velayudhan Pillai

Hi,

We came across a scenario where inspite of fsync-ing the directory,
the entry was not persisted - the file created under this directory
was lost.

Consider the following workload :

1. creat test/foo
2. mkdir test/A
3. creat test/A/foo
4. fsync test/A/foo
5. fsync test
-----crash-----

When we recover after the crash, the contents in the directory are as follows:
dir test:
    A

dir test/A:
    foo

Notice that file foo that was created in step 1 above, is lost inspite
of calling a fsync on its parent directory. On all other
filesystems(ext4, xfs, and f2fs), we see file foo persisted in the
test directory. We expect directory entries to be persisted when the
directory inode is fsynced right? Losing file foo doesn't seem to be
the right behavior.


Thanks,
Jayashree Mohan

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

* Re: Directory entry not persisted on a fsync
  2018-04-20 18:05 Directory entry not persisted on a fsync Jayashree Mohan
@ 2018-04-21 17:23 ` Jayashree Mohan
  2018-04-22 15:14   ` David Sterba
  2018-04-24 14:20 ` Vijay Chidambaram
  1 sibling, 1 reply; 4+ messages in thread
From: Jayashree Mohan @ 2018-04-21 17:23 UTC (permalink / raw)
  To: linux-btrfs, fstests, Vijaychidambaram Velayudhan Pillai
  Cc: Zygo Blaxell, Filipe Manana

Hi,

A gentle reminder on the above behavior on btrfs : Even on fsync-ing
the directory, its entries are not persisted. Could you let us know
your thoughts on this?

Thanks,
Jayashree Mohan



On Fri, Apr 20, 2018 at 1:05 PM, Jayashree Mohan
<jayashree2912@gmail.com> wrote:
> Hi,
>
> We came across a scenario where inspite of fsync-ing the directory,
> the entry was not persisted - the file created under this directory
> was lost.
>
> Consider the following workload :
>
> 1. creat test/foo
> 2. mkdir test/A
> 3. creat test/A/foo
> 4. fsync test/A/foo
> 5. fsync test
> -----crash-----
>
> When we recover after the crash, the contents in the directory are as follows:
> dir test:
>     A
>
> dir test/A:
>     foo
>
> Notice that file foo that was created in step 1 above, is lost inspite
> of calling a fsync on its parent directory. On all other
> filesystems(ext4, xfs, and f2fs), we see file foo persisted in the
> test directory. We expect directory entries to be persisted when the
> directory inode is fsynced right? Losing file foo doesn't seem to be
> the right behavior.
>
>
> Thanks,
> Jayashree Mohan

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

* Re: Directory entry not persisted on a fsync
  2018-04-21 17:23 ` Jayashree Mohan
@ 2018-04-22 15:14   ` David Sterba
  0 siblings, 0 replies; 4+ messages in thread
From: David Sterba @ 2018-04-22 15:14 UTC (permalink / raw)
  To: Jayashree Mohan
  Cc: linux-btrfs, fstests, Vijaychidambaram Velayudhan Pillai,
	Zygo Blaxell, Filipe Manana

On Sat, Apr 21, 2018 at 12:23:58PM -0500, Jayashree Mohan wrote:
> A gentle reminder on the above behavior on btrfs : Even on fsync-ing
> the directory, its entries are not persisted. Could you let us know
> your thoughts on this?

Sending a gentle reminder one day after the report and even on a weekend
day will not make any difference, please avoid that in the future.

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

* Re: Directory entry not persisted on a fsync
  2018-04-20 18:05 Directory entry not persisted on a fsync Jayashree Mohan
  2018-04-21 17:23 ` Jayashree Mohan
@ 2018-04-24 14:20 ` Vijay Chidambaram
  1 sibling, 0 replies; 4+ messages in thread
From: Vijay Chidambaram @ 2018-04-24 14:20 UTC (permalink / raw)
  To: Jayashree Mohan; +Cc: linux-btrfs, fstests, Filipe Manana, Zygo Blaxell

Hi all,

Any thoughts on this?

We completely understand you are all busy and might be traveling, so
we only need a simple ack from you: that when we fsync a directory in
btrfs, we can expect the contents to get persisted. We understand that
is not your highest priority item, and that you will fix it later.

The reason we email to the list is because there is no written set of
guarantees each file system provides. So working with the file-system
developers is the only way we can understand whether something is
intentional behavior or a bug.

It would help us investigate btrfs crash consistency better in the
future and possibly help us find bugs!

Thanks,
Vijay

On Fri, Apr 20, 2018 at 1:05 PM, Jayashree Mohan
<jayashree2912@gmail.com> wrote:
>
> Hi,
>
> We came across a scenario where inspite of fsync-ing the directory,
> the entry was not persisted - the file created under this directory
> was lost.
>
> Consider the following workload :
>
> 1. creat test/foo
> 2. mkdir test/A
> 3. creat test/A/foo
> 4. fsync test/A/foo
> 5. fsync test
> -----crash-----
>
> When we recover after the crash, the contents in the directory are as follows:
> dir test:
>     A
>
> dir test/A:
>     foo
>
> Notice that file foo that was created in step 1 above, is lost inspite
> of calling a fsync on its parent directory. On all other
> filesystems(ext4, xfs, and f2fs), we see file foo persisted in the
> test directory. We expect directory entries to be persisted when the
> directory inode is fsynced right? Losing file foo doesn't seem to be
> the right behavior.
>
>
> Thanks,
> Jayashree Mohan
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2018-04-24 14:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-20 18:05 Directory entry not persisted on a fsync Jayashree Mohan
2018-04-21 17:23 ` Jayashree Mohan
2018-04-22 15:14   ` David Sterba
2018-04-24 14:20 ` Vijay Chidambaram

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.