On Sun, Dec 22, 2019 at 10:36 PM Amir Goldstein wrote:
>
> On Mon, Dec 23, 2019 at 7:16 AM Deepa Dinamani wrote:
> >
> > Addition of fs-specific timestamp range checking was added
> > in 188d20bcd1eb ("vfs: Add file timestamp range support").
> >
> > Add a check for whether the kernel supports the limits check
> > before running the associated test.
> >
> > Signed-off-by: Deepa Dinamani
> > ---
> > common/rc | 11 +++
> > tests/generic/402 | 3 +++
> > 2 files changed, 14 insertions(+)
> >
> > diff --git a/common/rc b/common/rc
> > index 816588d6..472db995 100644
> > --- a/common/rc
> > +++ b/common/rc
> > @@ -1981,6 +1981,17 @@ _run_aiodio()
> > return $status
> > }
> >
> > +_require_kernel_timestamp_range()
> > +{
> > + # 128-byte inodes do not have room for extended timestamp
> > + MKFS_OPTIONS=-I128 _scratch_mkfs_ext4 &>> $seqres.full 2>&1 ||
> > _fail "ext4 mkfs failed"
> > +
> > + mount -t ext4 ${SCRATCH_DEV} ${SCRATCH_MNT}
> > + _check_dmesg_for "ext4 filesystem being mounted at ${SCRATCH_MNT}
> > supports timestamps until 2038" || \
> > + _notrun "Kernel does not support timestamp limits"
> > + umount ${SCRATCH_MNT}
> > +}
> > +
>
> Deepa,
>
> Thank you for following up.
> I am not sure if mkfs.ext4 of scratch partition in a generic test is going to
> be
> very popular - let's see what others have to say.
> You can certainly now do that without checking that ${SCRATCH_DEV} is
> a blockdev which is not the case for overlay and networking filesystems.
_require_block_device() should alleviate this concern. But, I think
making it a loop back device is a good idea.
I meant to check when mkfs.ext4 would fail, but I forgot. I will
change this in v2.
> Why did you choose not to use a loop mounted ext2 for the check as
> I suggested?
> You can use _require_loop() and _require_ext2() inside the check.
> In any case, please also check for failure to mount.
I did not not see anybody creating ext2 filesystem, and I thought that
finding a kernel supporting ext4 was a lot more likely. We can add a
_require_ext4() along the lines of _ext2_reqire() if really necessary.
We should also add "_require_command "$MKFS_EXT4_PROG" mkfs.ext4".
I think it does not matter which filesystem we use unless we get the
warning. Let me know if I missed something.
I will pick one of the two: ext4 (with small inode) or ext2 and do a
loop back device instead for v2. I will also add the suggested-by that
I forgot on this patch.
-Deepa
___
Y2038 mailing list
Y2038@lists.linaro.org
https://lists.linaro.org/mailman/listinfo/y2038