[lustre-discuss] lfs find with time queries

Andreas Dilger adilger at whamcloud.com
Wed Nov 28 13:35:06 PST 2018

On Nov 28, 2018, at 12:20, Manno, Dominic Anthony <dmanno at lanl.gov> wrote:
> Hi,
> When using lfs find with mtime or ctime it appears to first check the MDS time, if the query is satisfied then that file is printed, if not then send RPC to OSTs to check their times for the file. There is a very old lustre-discuss post that Andreas discusses this behavior, so I think I understand that fine now.
> I'm wondering... if time is eventually consistent on the MDS, could there be an option to lfs find to tell it to only check the MDS no matter what? Especially as we get close to lazy size on MD, then the traversal to OSTs for size is saved, but there would still exist this time component. Unless I'm totally off base and time isn't eventually consistent on the MDS and will always require OST communication. If there is an eventual consistency to time on the MDS, how big is that window? Are there any other implementation details that would prevent a "only care about MDS time" flag?
> I'm running some tests to verify my thinking on time handling, but some other input here would be greatly appreciated. 

This seems fairly reasonable.  There is a patch that adds a "--lazy" flag for "lfs find" to use the LSOM size/blocks data (if available), and this could be easily expanded to cover the timestamps as well.  There is some question whether the mtime will be kept totally uptodate on the MDS (normally mtime is only kept on the OST objects), but that seems like a relatively small change to also update mtime on close on the MDS.

Cheers, Andreas
Andreas Dilger
Principal Lustre Architect

More information about the lustre-discuss mailing list