linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maciej Marcin Piechotka <uzytkownik2@gmail.com>
To: linux-btrfs@vger.kernel.org
Subject: Re: Regression in btrfs-next: BUG at fs/btrfs/super.c:984!
Date: Sun, 02 Oct 2011 23:15:33 +0200	[thread overview]
Message-ID: <1317590133.3354.1.camel@picard> (raw)
In-Reply-To: <20111002173910.GL22205@twin.jikos.cz>

[-- Attachment #1: Type: text/plain, Size: 1226 bytes --]

On Sun, 2011-10-02 at 19:39 +0200, David Sterba wrote:
> On Sat, Oct 01, 2011 at 11:43:10PM +0200, Maciej Marcin Piechotka wrote:
> > PS. It might happened that it was caused by parition mounted read-only
> > on read-only block device.
>   ^^^
> 
> This is the key information!
> 
> super.c: btrfs_calc_avail_data_space()
>  983         nr_devices = fs_info->fs_devices->rw_devices;
>  984         BUG_ON(!nr_devices);
> 
> 
> If there are no writable devices, this BUGON fires, although this case
> in connection with RO mount is handled elsewhere properly.
> 
> This is called through sysfs and just tries to obtain available free
> space information to print it. I think the BUG_ON is not necessary here
> and the function can take a short track returning 0 as available free
> space:
> 
> if (!nr_devices) {
> 	*free_bytes = 0;
> 	return 0;
> }
> 
> I could be possible to actually read the free space even from a RO
> device (be it RO mount or not), but I don't see much benefit which would
> justify the work.
> 
> Can you please test the fix and let us know if the statfs number look
> reasonable?
> 
> 
> david

Well - it shows size 50G, used 29G and avail 0G in df -h.

Regards

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

      reply	other threads:[~2011-10-02 21:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-01 21:43 Regression in btrfs-next: BUG at fs/btrfs/super.c:984! Maciej Marcin Piechotka
2011-10-02 17:39 ` David Sterba
2011-10-02 21:15   ` Maciej Marcin Piechotka [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1317590133.3354.1.camel@picard \
    --to=uzytkownik2@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).