| To: | Theodore Ts'o <tytso@xxxxxxx> |
|---|---|
| Subject: | Re: Documenting MS_LAZYTIME |
| From: | "Michael Kerrisk (man-pages)" <mtk.manpages@xxxxxxxxx> |
| Date: | Fri, 27 Feb 2015 09:01:10 +0100 |
| Cc: | mtk.manpages@xxxxxxxxx, Eric Sandeen <sandeen@xxxxxxxxxx>, Ext4 Developers List <linux-ext4@xxxxxxxxxxxxxxx>, Linux btrfs Developers List <linux-btrfs@xxxxxxxxxxxxxxx>, XFS Developers <xfs@xxxxxxxxxxx>, linux-man@xxxxxxxxxxxxxxx, Linux-Fsdevel <linux-fsdevel@xxxxxxxxxxxxxxx>, Linux API <linux-api@xxxxxxxxxxxxxxx> |
| Delivered-to: | xfs@xxxxxxxxxxx |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=CbuRlvMYiiPyVfbIuEgM7Cqj8IRwy29YvFQIbE4fuFk=; b=R4S2xweTbiKD8Nhj7fjDPDGJFJ92ZlhRqmsprIF6wH6Gm6DkyuU3S3juPy9N0Q9hgq 1VW9j9fQ/8KH2YF5oJEHjMR1uAGKzDNpyDw5N+QVaNEud4G08mqIHpEoTn09mbOtDdmf JSR6aobXMRCPYwyZJTghKq8zuOf0bomVQqamDVqNn0VYUhWbtFS6Hy3bbfNfinsMJ+7V ycy/QmYV9BV3dc+uvXnZOM62Mkx08oSrGY3OGNT773GIud3O3HBXkFTkGkqEwpBFjmJP 7+VKGG0m5QvZQlKdAz5yflA3/KxW0HpYOTda6YZb74+9K0oxZLzNXavzl5uzsPhDq1eK biPA== |
| In-reply-to: | <20150227000409.GC17174@xxxxxxxxx> |
| References: | <CAHO5Pa0k7QkV_6BDjwTVxa7LV9tFyN9nGFFcSvOC6HYO08wfrw@xxxxxxxxxxxxxx> <54E7578E.4090809@xxxxxxxxxx> <20150221025636.GB7922@xxxxxxxxx> <54EEDE23.6080009@xxxxxxxxx> <20150226133113.GD11217@xxxxxxxxx> <54EF2161.90607@xxxxxxxxx> <20150227000409.GC17174@xxxxxxxxx> |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
On 02/27/2015 01:04 AM, Theodore Ts'o wrote:
> On Thu, Feb 26, 2015 at 02:36:33PM +0100, Michael Kerrisk (man-pages) wrote:
>>
>> The disadvantage of MS_STRICTATIME | MS_LAZYTIME is that
>> in the case of a system crash, the atime and mtime fields
>> on disk might be out of date by at most 24 hours.
>
> I'd change to "The disadvantage of MS_LAZYTIME is that..." and
> perhaps move that so it's clear it applies to any use of MS_LAZYTIME
> has this as a downside.
>
> Does that make sense?
Thanks, Ted. Got it. So, now we have:
MS_LAZYTIME (since Linux 3.20)
Reduce on-disk updates of inode timestamps (atime,
mtime, ctime) by maintaining these changes only in memâ
ory. The on-disk timestamps are updated only when:
(a) the inode needs to be updated for some change unreâ
lated to file timestamps;
(b) the application employs fsync(2), syncfs(2), or
sync(2);
(c) an undeleted inode is evicted from memory; or
(d) more than 24 hours have passed since the inode was
written to disk.
This mount significantly reduces writes needed to update
the inode's timestamps, especially mtime and atime.
However, in the event of a system crash, the atime and
mtime fields on disk might be out of date by up to 24
hours.
Examples of workloads where this option could be of sigâ
nificant benefit include frequent random writes to preâ
allocated files, as well as cases where the MS_STRICTAâ
TIME mount option is also enabled. (The advantage of
(MS_STRICTATIME | MS_LAZYTIME) is that stat(2) will
return the correctly updated atime, but the atime
updates will be flushed to disk only when (1) the inode
needs to be updated for filesystem / data consistency
reasons or (2) the inode is pushed out of memory, or (3)
the filesystem is unmounted.)
Cheers,
Michael
--
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re:DBDMC INDOOR PVC FLOORING, Amy liu |
|---|---|
| Next by Date: | Re: Documenting MS_LAZYTIME, Omar Sandoval |
| Previous by Thread: | Re: Documenting MS_LAZYTIME, Theodore Ts'o |
| Next by Thread: | Re: Documenting MS_LAZYTIME, Omar Sandoval |
| Indexes: | [Date] [Thread] [Top] [All Lists] |