RE: [PATCH] fat: print s_dev via fat_msg

From: Sungjong Seo
Date: Tue Jul 09 2024 - 07:35:45 EST


> "Sungjong Seo" <sj1557.seo@xxxxxxxxxxx> writes:
>
> >> Sungjong Seo <sj1557.seo@xxxxxxxxxxx> writes:
> >>
> >> > To clarify MAJOR/MINOR number of a mounted device, fat_msg prints
> prefix
> >> > that includes them.
> >>
> >> Hm, why do we need the major/minor (why can't use sysfs to resolve if
> >> need), and why do you care only fat?
> >> Thanks.
> > You're right, if you can access to sysfs on a system, this might not
> > be useful. However, when analyzing problems based on logs, s_dev can be
> > very helpful for identifying devices. This is because, in systems like
> > Android, a filesystem gets mounted on a device node with a nickname
> > like public:179,1.
> >
> > I think it would be really useful if applied to representative
> filesystems
> > for removable storage devices such as fat and exfat. So I will send the
> > similar PR to exfat as well.
>
> So this is for the naming policy like android?
Yes, but I think it is just one of examples.
>
> And why don't you care the other places (like vfs) that using ->s_id?
Because, I think it's enough to change fat-fs and exfat-fs.
>
> Because I dislike to use the inconsitent stuff, some logs are "sda3" and
> some logs are "sda3[8:3]".
Do you mean consistency between all logs under Linux VFS?
If so, I think it's meaningless. As mentioned above, this patch
helps analyze removable storage devices, so it would be nice if it could
be applied to both fat-fs and exfat-fs.

Anyway, this is just my opinion and I think you might have a different one.
Thanks!
>
> Thanks.
> --
> OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>