linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Goffredo Baroncelli <kreijack@gmail.com>
To: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Add the "btrfs filesystem label" command
Date: Thu, 16 Sep 2010 20:00:08 +0200	[thread overview]
Message-ID: <201009162000.08643.kreijack@inwind.it> (raw)
In-Reply-To: <AANLkTik85y4fbyhqw0DqV9x7TsVwo5uZZhLBHiy-oPsC@mail.gmail.com>

On Thursday, 16 September, 2010, Mike Fedyk wrote:
> On Mon, Sep 13, 2010 at 12:24 PM, Goffredo Baroncelli
> <kreijack@gmail.com> wrote:
[...]
> > +
> > +       if(ret != 0)
> > +       {
> > +              fprintf(stderr, "FATAL: the filesystem has to be
> > unmounted\n");
> > +              return -2;
> > +       }
> > +       get_label_unmounted(btrfs_dev);
> > +       return 0;
> > +}
> > +
> > +
> 
> Why can't the label be read while the fs is mounted?  It shouldn't
> hurt anything.  I can read the superblock on my ext3 fs while it's
> mounted...  This is what people have come to expect.

The main reason is that if a filesystem is mounted, the data read from 
userspace may be outdated by the internal data.

In the original patch (the one of Morey Roof), there was a kernel space code 
that handled this case. In order to simplify the patch I split the code in two 
step the user space and the kernel space.

This is the user space portion, and because it has to work without the kernel 
space portion, when it is required the code fail explicitly.

I hope to publish the 2nd patch during the next weeks.

Regards
G.Baroncelli

-- 
gpg key@ keyserver.linux.it: Goffredo Baroncelli (ghigo) <kreijack@inwind.it>
Key fingerprint = 4769 7E51 5293 D36C 814E  C054 BF04 F161 3DC5 0512

      parent reply	other threads:[~2010-09-16 18:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-13 19:24 [PATCH] Add the "btrfs filesystem label" command Goffredo Baroncelli
2010-09-15 13:18 ` Felix Blanke
2010-09-16  0:31 ` Mike Fedyk
2010-09-16  1:10   ` Chris Ball
2010-09-16  3:56     ` cwillu
2010-09-16 18:00   ` Goffredo Baroncelli [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=201009162000.08643.kreijack@inwind.it \
    --to=kreijack@gmail.com \
    --cc=kreijack@inwind.it \
    --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).