[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [PATCH] guess_fstype applet
From:       walter harms <wharms () bfs ! de>
Date:       2015-02-12 8:21:32
Message-ID: 54DC628C.8030905 () bfs ! de
[Download RAW message or body]

hi all,
i was following the discussions a bit and now i have a minor question.
so the idea guess_fstype is to be a subroutine of mount ?!
why not make it a proper command ?
Output could be something like  a mount cmdline.

I got this idea because in the past i had the problem of cloning a
drive setup (keywords: size, raid, lvm). In the end I wrote a small script
with the right setup but i guess it would be a boom for backup programms
and guessing the filesystem parameters would be a nice first step.

just my two cents,
 wh


Am 12.02.2015 01:20, schrieb Tanguy Pruvot:
> Thanks, i think it will be another divergence, the main purpose of this
> patch is for the android recovery which should be able to mount badly set
> fstype (exemple: for a backup)
> 
> Even if in CM the recovery can be installed on each nightly, we have the
> ability to keep a custom one (to handle different backup formats etc...)
> and the fstab can be different of the recovery one.
> 
> Now we have another problem about that, its the ability to use encrypted
> file systems...
> 
> 2015-02-11 20:37 GMT+01:00 Tanguy Pruvot <tanguy.pruvot@gmail.com>:
> 
>> Thanks for the review... was merged too fast
>>
>> 2015-02-11 20:32 GMT+01:00 Isaac Dunham <ibid.ag@gmail.com>:
>>
>>> On Wed, Feb 11, 2015 at 07:50:49PM +0100, Tanguy Pruvot wrote:
>>>> 2015-02-11 19:48 GMT+01:00 Denys Vlasenko <vda.linux@googlemail.com>:
>>>>
>>>>> On Fri, Feb 6, 2015 at 5:35 PM, Tanguy Pruvot <
>>> tanguy.pruvot@gmail.com>
>>>>> wrote:
>>>>>> From CyanogenMod :
>>>>>>
>>>>>> http://review.cyanogenmod.org/#/c/87995/
>>>>>>
>>>>>> 2013-08-23 6:20 GMT+02:00 James B <jamesbond3142@gmail.com>:
>>>>>>>
>>>>>>> If the interface can be simplifed to detect filesystem only
>>> (instead
>>>>>>> of also looking for labels and UUID) I think I think it would get
>>> an
>>>>>>> order of magnitude speed-up (taking the cues from Puppy Linux's
>>>>>>> original guess_fstype which basically does just that). I'm not so
>>> sure
>>>>>>> about code-size reduction, though.
>>>>>>>
>>>>>>> It is called guess_fstype for historical reason (because that's
>>> how it
>>>>>>> was used and called in Puppy Linux), I'm happy to change it to
>>>>>>> "fstype" if that helps everybody else :)
>>>>>
>>>>> I'm confused.
>>>>> Is here something proposed for inclusion into busybox,
>>>>> or you are now talking about hacks for a particular project only?
>>>>
>>>> its a feature to enhance the auto mount with blkid code... we are about
>>> to
>>>> merge this commit soon in CM12
>>>
>>> Comments:
>>> - do NOT let code override a user specification.
>>> If I specify -t (ntfs|ntfs-3g) or (msdos|vfat) manually, it should force
>>> mount to try mounting using that specific driver and then *fail* if
>>> it's impossible.
>>> If fstype overrides user specifications, you may end up breaking future
>>> filesystems.
>>> I would think that this would be better:
>>>         // Treat fstype "auto" as unspecified
>>>         if (mp->mnt_type && strcmp(mp->mnt_type, "auto") == 0)
>>>                 mp->mnt_type = NULL;
>>> +#if ENABLE_FEATURE_BLKID_TYPE
>>> +       // try to to autodetect type
>>> +       if (!mp->mnt_type)
>>> +               mp->mnt_type = get_fstype_from_devname(mp->mnt_fsname);
>>> #endif
>>>
>>> OTOH, if I specify -t auto and userspace code selects the wrong fs type
>>> (as it surely will, because bugs and unexpected inputs happen...),
>>> it would be proper for mount to keep retrying, as would be done if
>>> mp->mnt_type is unset after the new code.
>>>
>>> - I'm guessing that the use of != to compare two strings is a mistake?
>>> +       || (detected_fstype != NULL && detected_fstype != mp->mnt_type))
>>>
>>> - guess_fstype, fstype, blkid commands:
>>>  guess_fstype is the name that Puppy Linux has used for a command that
>>>  outputs filesystem type without label/uuid.
>>>  fstype is the name that it goes by in Toybox, which is now in Android.
>>>  However, upstream Android turns it off and just uses blkid.
>>>
>>> HTH,
>>> Isaac Dunham
>>>
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic