[LTP] [PATCH 1/2] lib: limit the size of tmpfs in LTP

Li Wang liwang@redhat.com
Fri Jul 2 14:20:37 CEST 2021


On Fri, Jul 2, 2021 at 8:06 PM Cyril Hrubis <chrubis@suse.cz> wrote:

> Hi!
> > > > +
> > > > +             if (!strcmp(tdev.fs_type, "tmpfs"))
> > > > +                     tst_test->mnt_data = mnt_data;
> > >
> > > I guess that we are doing this in order to export the changes in the
> > > mnt_data to the test, right?
> > >
> > > Is that needed for something or are you doing this just in a case that
> > > somebody will use that?
> > >
> >
> > No, you probably mis-read this part.
> >
> > In contrast, this is just to restore it to the original value,
> > because we don't want to export the changed tst_test->mnt_data
> > take effect on other filesystems.
>
> I'm just asking why we are setting it in the first place?
>
> If we do not change it there is no need to restore the value, so the
> real question is, do we need to change the tst_test->mnt_data at all?
>

Alright, we can just return a new pointer buf, and do nothing
for the tst_test->mnt_data itself.

Seems the misread person is me (I need more coffee now:).

-- 
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20210702/32ade573/attachment.htm>


More information about the ltp mailing list