Re: [PATCH 3/5] 95fstab-sys: use det_fs and wrap_fsck

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 20, 2011 at 05:09:25PM +0200, Michal Soltys wrote:
> +fstab_mount() {
> +    local _dev _mp _fs _opts _dump _pass _rest
>      test -e "$1" || return 1
>      info "Mounting from $1"
> -    while read dev mp type opts rest; do
> -	[ -z "${dev%%#*}" ]&& continue # Skip comment lines
> -	mount -v -t $type -o $opts $dev $NEWROOT/$mp
> -    done < $1 | vinfo
> +    while read _dev _mp _fs _opts _dump _pass _rest; do

 How does this code handle encoding in fstab? (e.g. /path/foo\x40bar)

> +        [ -z "${_dev%%#*}" ] && continue # Skip comment lines
> +        if [ ! -e "$_dev" ]; then
> +            warn "Device $_dev doesn't exist, skipping mount."
> +            continue
> +        fi
> +        if [ "$_pass" -gt 0 ] && ! strstr "$_opts" _netdev; then
> +            wrap_fsck "$_dev"
> +        fi
> +        _fs=$(det_fs "$_dev" "$_fs" /etc/fstab.sys)
> +        info "Mounting $_dev"
> +        mount -v -t $_fs -o $_opts $_dev $NEWROOT/$_mp 2>&1 | vinfo
> +    done < $1

 It means that fsck is not running in parallel if you have more
 devices in /ect/fstab.sys. Is it expected?

 It would be better to call one fsck instance for all devices
 
    fsck -T /dev/sda1 /dev/sda2 /dev/sdb1

 or use the "-l" option for more instances.

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux