Whamcloud - gitweb
LU-16946 utils: allow lfs find time within a range
If multiple times are specified on the command-line like:
lfs find -atime +60 -atime -90 ...
use those times as the upper and lower bounds of the margin.
This makes it easier to find files that were created within
a specific range of dates.
While working on this patch I noticed that that margin
bounds are a little odd; using the range:
(limit - margin, limit]
instead of what I intuitively thought,
(limit - margin, limit + margin)
The logic behind this is unknown to me, but it can be found
'liblustreapi.c' in the method 'find_value_cmp()'.
However, for the time being, when using a time range, it will
simply shift the limit to the largest of the two and have
the margin cover the difference.
Signed-off-by: Frederick Dilger <fdilger@whamcloud.com>
Change-Id: I2e5b856396472eab91e1d2c3214f304010601a41
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55271
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Jian Yu <yujian@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>