[Top] [All Lists]

Re: [PATCH-v5 1/5] vfs: add support for a lazytime mount option

To: Jan Kara <jack@xxxxxxx>, Ted Ts'o <tytso@xxxxxxx>
Subject: Re: [PATCH-v5 1/5] vfs: add support for a lazytime mount option
From: Boaz Harrosh <boaz@xxxxxxxxxxxxx>
Date: Tue, 02 Dec 2014 19:55:48 +0200
Cc: linux-fsdevel@xxxxxxxxxxxxxxx, linux-ext4@xxxxxxxxxxxxxxx, linux-btrfs@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20141202125820.GE9092@xxxxxxxxxxxxx>
References: <1417154411-5367-1-git-send-email-tytso@xxxxxxx> <1417154411-5367-2-git-send-email-tytso@xxxxxxx> <20141128172323.GD738@xxxxxxxxxxxxx> <20141128181421.GA19461@xxxxxxxxxx> <20141202125820.GE9092@xxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0
On 12/02/2014 02:58 PM, Jan Kara wrote:
> On Fri 28-11-14 13:14:21, Ted Tso wrote:
>> On Fri, Nov 28, 2014 at 06:23:23PM +0100, Jan Kara wrote:
>>> Hum, when someone calls fsync() for an inode, you likely want to sync
>>> timestamps to disk even if everything else is clean. I think that doing
>>> what you did in last version:
>>>     dirty = inode->i_state & I_DIRTY_INODE;
>>>     inode->i_state &= ~I_DIRTY_INODE;
>>>     spin_unlock(&inode->i_lock);
>>>     if (dirty & I_DIRTY_TIME)
>>>             mark_inode_dirty_sync(inode);
>>> looks better to me. IMO when someone calls __writeback_single_inode() we
>>> should write whatever we have...
>> Yes, but we also have to distinguish between what happens on an
>> fsync() versus what happens on a periodic writeback if I_DIRTY_PAGES
>> (but not I_DIRTY_SYNC or I_DIRTY_DATASYNC) is set.  So there is a
>> check in the fsync() code path to handle the concern you raised above.
>   Ah, this is the thing you have been likely talking about but which I was
> constantly missing in my thoughts. You don't want to write times when inode
> has only dirty pages and timestamps - 

This I do not understand. I thought that I_DIRTY_TIME, and the all
lazytime mount option, is only for atime. So if there are dirty
pages then there are also m/ctime that changed and surly we want to
write these times to disk ASAP.

if we are lazytime also with m/ctime then I think I would like an
option for only atime lazy. because m/ctime is cardinal to some
operations even though I might want atime lazy.

Sorry for the slowness, I'm probably missing something

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