[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fix df hanging on excluded file systems
From: |
Pádraig Brady |
Subject: |
Re: Fix df hanging on excluded file systems |
Date: |
Thu, 9 Mar 2017 22:48:34 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
On 09/03/17 22:34, Philipp Thomas wrote:
> A customer discovered in coreutils 8.22, that excluding filesystem types
> hangs on exactly those, i.e. 'df -x nfs' hangs. We have a patch that makes
> df skip excluded or unselected filesystems in the same way as remote ones
> with --local. Would such a patch be acceptable for you?
>
> The patch is:
>
> --- coreutils-8.22/src/df.c
> +++ coreutils-8.22/src/df.c
> @@ -628,9 +628,12 @@ filter_mount_list (bool devices_only)
> read_file_system_list() could populate me_dev from those
> for efficiency and accuracy. */
> if ((me->me_remote && show_local_fs)
> + || (!selected_fstype (me->me_type)
> + || excluded_fstype (me->me_type))
> || -1 == stat (me->me_mountdir, &buf))
> {
> - /* If remote, and showing just local, add ME for filtering later.
> + /* If remote, and showing just local, or filesystem type is
> excluded,
> + add ME for filtering later.
> If stat failed; add ME to be able to complain about it later.
> */
> buf.st_dev = me->me_dev;
> }
Seems sensible enough at first glance
thanks,
Pádraig