lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 27 Jul 2011 10:25:17 -0400
From:	Josef Bacik <josef@...hat.com>
To:	Andy Whitcroft <apw@...onical.com>
CC:	Chris Mason <chris.mason@...cle.com>, linux-btrfs@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] btrfs: btrfs_calc_avail_data_space cope with no read/write
 devices

On 07/27/2011 07:01 AM, Andy Whitcroft wrote:
> When we mount a btrfs filesystem from read-only media there will be no
> read/write devices; for example mounting an SD card with its lock enabled.
> This triggers an immediate BUG during mount:
> 
>   kernel BUG at .../fs/btrfs/super.c:984!
> 
> This is triggered by statfs when calculating the free space in the
> filesytem.  We bug if the number of read/write devices is 0.
> 
> It seems more appropriate to indicate we have no writable space.  Note
> that this does make df return 0 free blocks on a read-only device.
> Whether that is reasonable is debatable.

No it's not, it's wrong.  We should just look at the devices in general
and not just the rw_devices.  We can still get the right info out, if
you mount a ext* fs ro you still get the right output from df.  Thanks,

Josef
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ