[Top] [All Lists]

Re: XFS syncs

To: flux@xxxxxxxxx
Subject: Re: XFS syncs
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Fri, 4 Jul 2014 09:17:30 +1000
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <53B59B81.2030603@xxxxxxxxx>
References: <53B59B81.2030603@xxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Thu, Jul 03, 2014 at 10:05:53PM +0400, flux@xxxxxxxxx wrote:
> Hi,
> I issue 'mkdir abc' on my xfs partition the cut off the power. After
> reboot there's no 'abc' directoy.

Because you didn't sync(1) the filesystem or fsync(2) the directory
before you cut the power. Hence the change never hit the disk.

> However, when I do that on ext4
> the 'abc' direcory is always created after reboots.

That'll be pure fluke - ext4 delays journal writes on namespace
operations just like XFS does.

> All the
> settings, about mount options are default for my distro. What am I
> missing or how do I change the things of the jounral or whatever?

If you want directory operations to hitthe disk immediately, then
mount with the "-o wsync" option. Be aware, however, that this will
kill performance unless you have expensive storage with a large
amount of battery backed write cache in front of the disks. There's
a good chance it will also cause excessive wear on SSDs due to the
frequent journal writes.


Dave Chinner

<Prev in Thread] Current Thread [Next in Thread>