# Re: Documenting MS\_LAZYTIME

- List: linux-api
- 4 messages, 3 authors
- Page: https://ratatoskr.run/linux-api/2015/02/92877/t

## Re: Documenting MS\_LAZYTIME

- From: Michael Kerrisk (man-pages) \<hidden\>
- Date: 2015-02-26 08:49:39 
- Message: https://ratatoskr.run/linux-api/2015/02/92877.md

```text
Ted,

On 02/21/2015 03:56 AM, Theodore Ts'o wrote:
> On Fri, Feb 20, 2015 at 09:49:34AM -0600, Eric Sandeen wrote:
>>
>>>               This mount option significantly reduces  writes  to  the
>>>               inode  table  for workloads that perform frequent random
>>>               writes to preallocated files.
>>
>> This seems like an overly specific description of a single workload out
>> of many which may benefit, but what do others think?  "inode table" is also
>> fairly extN-specific.
> 
> How about somethign like "This mount significantly reduces writes
> needed to update the inode's timestamps, especially mtime and actime.

What is "actime" in the preceding line? Should it be "ctime"?

> Examples of workloads where this could be a large win include frequent
> random writes to preallocated files, as well as cases where the
> MS_STRICTATIME mount option is enabled."?

I think some version of the following text could also usefully go 
into the page, but...

> (The advantage of MS_STRICTATIME | MS_LAZYTIME is that stat system
> calls will return the correctly updated atime, but those atime updates
> won't get flushed to disk unless the inode needs to be updated for
> file system / data consistency reasons, or when the inode is pushed
> out of memory, or when the file system is unmounted.)

I find the wording of there a little confusing. Is the following 
a correct rewrite:

    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.)

?

Thanks,

Michael


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
```

## Re: Documenting MS\_LAZYTIME

- From: Theodore Ts'o \<tytso@mit.edu\>
- Date: 2015-02-26 13:31:19 
- Message: https://ratatoskr.run/linux-api/2015/02/92881.md

```text
On Thu, Feb 26, 2015 at 09:49:39AM +0100, Michael Kerrisk (man-pages) wrote:
> > How about somethign like "This mount significantly reduces writes
> > needed to update the inode's timestamps, especially mtime and actime.
> 
> What is "actime" in the preceding line? Should it be "ctime"?

Sorry, no, it should be "atime".

> I find the wording of there a little confusing. Is the following 
> a correct rewrite:
> 
>     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.)

Yes, that's correct.  The only other thing I might add is that in the
case of a crash, the atime (or mtime) fields on disk might be out of
date by at most 24 hours.

						- Ted
```

## Re: Documenting MS\_LAZYTIME

- From: Michael Kerrisk (man-pages) \<hidden\>
- Date: 2015-02-26 13:36:33 
- Message: https://ratatoskr.run/linux-api/2015/02/92882.md

```text
On 02/26/2015 02:31 PM, Theodore Ts'o wrote:
> On Thu, Feb 26, 2015 at 09:49:39AM +0100, Michael Kerrisk (man-pages) wrote:
>>> How about somethign like "This mount significantly reduces writes
>>> needed to update the inode's timestamps, especially mtime and actime.
>>
>> What is "actime" in the preceding line? Should it be "ctime"?
> 
> Sorry, no, it should be "atime".

Thanks.

>> I find the wording of there a little confusing. Is the following 
>> a correct rewrite:
>>
>>     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.)
> 
> Yes, that's correct.  The only other thing I might add is that in the
> case of a crash, the atime (or mtime) fields on disk might be out of
> date by at most 24 hours.

So in other words, add a sentence to that last para:

    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.

Right?

Cheers,

Michael

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
```

## Re: Documenting MS\_LAZYTIME

- From: Theodore Ts'o \<tytso@mit.edu\>
- Date: 2015-02-27 00:04:15 
- Message: https://ratatoskr.run/linux-api/2015/02/92904.md

```text
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?

						- Ted
```
