Chris Ball | 2 Mar 2009 03:29
Favicon
Gravatar

Re: [review] Btrfs: Allow shrinking close to used space

Hi,

Here's a new patch that incorporates these comments.  We now update
device->fs_devices->total_rw_bytes before the shrink, as Josef suggests,
and create a new field in btrfs_device to store an on-disk size that is
only updated on a successful shrink operation, as requested by Yan.

(Thanks, Yan and Josef, for the patient explanations.)

==
From: Chris Ball <cjb <at> laptop.org>

Btrfs: When shrinking, only update disk size on success

Previously, we updated a device's size prior to attempting a shrink
operation.  This patch moves the device resizing logic to only happen if
the shrink completes successfully.  In the process, it introduces a new
field to btrfs_device -- disk_total_bytes -- to track the on-disk size.

Signed-off-by: Chris Ball <cjb <at> laptop.org>
---
 fs/btrfs/volumes.c |   35 ++++++++++++++++++++++++-----------
 fs/btrfs/volumes.h |    3 +++
 2 files changed, 27 insertions(+), 11 deletions(-)

diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 1316139..303b7d6 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
 <at>  <at>  -1433,7 +1433,7  <at>  <at>  static noinline int btrfs_update_device(struct btrfs_trans_handle *trans,
(Continue reading)

Филип Брчић | 2 Mar 2009 16:58
Gravatar

Btrfs on Ubuntu

Hi,

I just wanted to inform you all that I've built btrfs packages for ubuntu 
(intrepid). You can find them in my PPA 
(http://launchpad.net/~brcha/+archive/ppa) and install them in the following 
way:

First add the following lines to your /etc/apt/sources.list:

  deb http://ppa.launchpad.net/brcha/ppa/ubuntu intrepid main
  deb-src http://ppa.launchpad.net/brcha/ppa/ubuntu intrepid main

Then import my PPA signing key:

$ sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 
17f547c39c5c4071e254d0a7313d312748a22a95

update your package list:

$ sudo apt-get update

install btrfs-source and btrfs programs:

$ sudo apt-get install btrfs-source btrfs-progs module-assistant

and tell module assistant to build the btrfs module

$ sudo module-assistant prepare btrfs
$ sudo module-assistant auto-install btrfs

(Continue reading)

Peter Vander Klippe | 2 Mar 2009 17:27
Picon

Re: Btrfs on Ubuntu

Филип Брчић <brcha <at> gna.org> writes:
> Hi,
> 
> I just wanted to inform you all that I've built btrfs packages for ubuntu 
> (intrepid). You can find them in my PPA 
> (http://launchpad.net/~brcha/+archive/ppa) 

Thanks for this! I've been slowly working on a wiki page on the ubuntu 
community help site for exactly this.

https://help.ubuntu.com/community/btrfs

Please feel free to edit if you have any suggestions.

--
Peter VK

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Jan Engelhardt | 3 Mar 2009 03:28
Picon

Inode count in statvfs

Hi,

I noticed that `df -i` on btrfs returns zero values, much like it does 
for vfat and - I think I remember - reiser3.
It would be nice if btrfs could count the number of inodes on a volume, 
to get an overview of just how much dust I am collecting.
Is it doable?

Filesystem            Inodes   IUsed   IFree IUse% Mounted on
/dev/loop0                 0       0       0    -  /lo/kernel2

Jan
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Jan Engelhardt | 3 Mar 2009 04:09
Picon

Bug at extent-tree.c:3190

Hi,

The following oops was obtained by doing some copying; it's tainted-P by 
nvidia but maybe it still gives some hints.
The testcase is basically

$ rsync -HPSav a/ b/

where by a/ is a collection of kernel trees, and b/ is a fresh btrfs.

$ ls -l a/
drwxr-xr-x 19 jengelh users 4096 Jan 10 07:32 linux17
drwxr-xr-x 19 jengelh users 4096 Jan 10 07:34 linux18
drwxr-xr-x 19 jengelh users 4096 Jan 10 07:34 linux19
drwxr-xr-x 19 jengelh users 4096 Jan 10 07:34 linux20
drwxr-xr-x 19 jengelh users 4096 Jan 10 07:35 linux21
drwxr-xr-x 19 jengelh users 4096 Jan 10 07:35 linux22
drwxr-xr-x 19 jengelh users 4096 Jan 10 07:35 linux23
drwxr-xr-x 20 jengelh users 4096 Jan 10 07:35 linux24
drwxr-xr-x 21 jengelh users 4096 Jan 10 07:36 linux25
drwxr-xr-x 21 jengelh users 4096 Jan 10 07:36 linux26
drwxr-xr-x 22 jengelh users 4096 Jan 10 07:37 linux27
drwxr-xr-x 22 jengelh users 4096 Jan 10 07:37 linux28

btrfs searching for 98304 bytes, num_bytes 98304, loop 2, allowed_alloc 1
btrfs searching for 49152 bytes, num_bytes 49152, loop 2, allowed_alloc 1
btrfs searching for 24576 bytes, num_bytes 24576, loop 2, allowed_alloc 1
btrfs searching for 12288 bytes, num_bytes 12288, loop 2, allowed_alloc 1
btrfs searching for 45056 bytes, num_bytes 45056, loop 2, allowed_alloc 1
btrfs searching for 20480 bytes, num_bytes 20480, loop 2, allowed_alloc 1
(Continue reading)

Josef Bacik | 3 Mar 2009 16:40
Picon
Favicon

Re: Bug at extent-tree.c:3190

On Tue, Mar 03, 2009 at 04:09:38AM +0100, Jan Engelhardt wrote:
> Hi,
> 
> 
> 
> The following oops was obtained by doing some copying; it's tainted-P by 
> nvidia but maybe it still gives some hints.
> The testcase is basically
> 
> $ rsync -HPSav a/ b/
> 
> where by a/ is a collection of kernel trees, and b/ is a fresh btrfs.
> 
> $ ls -l a/
> drwxr-xr-x 19 jengelh users 4096 Jan 10 07:32 linux17
> drwxr-xr-x 19 jengelh users 4096 Jan 10 07:34 linux18
> drwxr-xr-x 19 jengelh users 4096 Jan 10 07:34 linux19
> drwxr-xr-x 19 jengelh users 4096 Jan 10 07:34 linux20
> drwxr-xr-x 19 jengelh users 4096 Jan 10 07:35 linux21
> drwxr-xr-x 19 jengelh users 4096 Jan 10 07:35 linux22
> drwxr-xr-x 19 jengelh users 4096 Jan 10 07:35 linux23
> drwxr-xr-x 20 jengelh users 4096 Jan 10 07:35 linux24
> drwxr-xr-x 21 jengelh users 4096 Jan 10 07:36 linux25
> drwxr-xr-x 21 jengelh users 4096 Jan 10 07:36 linux26
> drwxr-xr-x 22 jengelh users 4096 Jan 10 07:37 linux27
> drwxr-xr-x 22 jengelh users 4096 Jan 10 07:37 linux28
> 
>

ENOSPC, sorry :)
(Continue reading)

Jan Engelhardt | 3 Mar 2009 17:11
Picon

Re: Bug at extent-tree.c:3190


On Tuesday 2009-03-03 16:40, Josef Bacik wrote:
>> 
>> The following oops was obtained by doing some copying; it's tainted-P by 
>> nvidia but maybe it still gives some hints.
>> The testcase is basically
>> 
>> $ rsync -HPSav a/ b/
>> 
>> where by a/ is a collection of kernel trees, and b/ is a fresh btrfs.
>> 
>> $ ls -l a/
>> drwxr-xr-x 19 jengelh users 4096 Jan 10 07:32 linux17
>> drwxr-xr-x 19 jengelh users 4096 Jan 10 07:34 linux18
>> drwxr-xr-x 19 jengelh users 4096 Jan 10 07:34 linux19
>> drwxr-xr-x 19 jengelh users 4096 Jan 10 07:34 linux20
>> drwxr-xr-x 19 jengelh users 4096 Jan 10 07:35 linux21
>> drwxr-xr-x 19 jengelh users 4096 Jan 10 07:35 linux22
>> drwxr-xr-x 19 jengelh users 4096 Jan 10 07:35 linux23
>> drwxr-xr-x 20 jengelh users 4096 Jan 10 07:35 linux24
>> drwxr-xr-x 21 jengelh users 4096 Jan 10 07:36 linux25
>> drwxr-xr-x 21 jengelh users 4096 Jan 10 07:36 linux26
>> drwxr-xr-x 22 jengelh users 4096 Jan 10 07:37 linux27
>> drwxr-xr-x 22 jengelh users 4096 Jan 10 07:37 linux28
>
>ENOSPC, sorry :)

Ah heh, could be a cause. Even so, there is still "plenty" of
space (loop1 with btrfs is also 4184064K in size):

(Continue reading)

Josef Bacik | 3 Mar 2009 17:16
Picon
Favicon

Re: Bug at extent-tree.c:3190

On Tue, Mar 03, 2009 at 05:11:06PM +0100, Jan Engelhardt wrote:
> 
> On Tuesday 2009-03-03 16:40, Josef Bacik wrote:
> >> 
> >> The following oops was obtained by doing some copying; it's tainted-P by 
> >> nvidia but maybe it still gives some hints.
> >> The testcase is basically
> >> 
> >> $ rsync -HPSav a/ b/
> >> 
> >> where by a/ is a collection of kernel trees, and b/ is a fresh btrfs.
> >> 
> >> $ ls -l a/
> >> drwxr-xr-x 19 jengelh users 4096 Jan 10 07:32 linux17
> >> drwxr-xr-x 19 jengelh users 4096 Jan 10 07:34 linux18
> >> drwxr-xr-x 19 jengelh users 4096 Jan 10 07:34 linux19
> >> drwxr-xr-x 19 jengelh users 4096 Jan 10 07:34 linux20
> >> drwxr-xr-x 19 jengelh users 4096 Jan 10 07:35 linux21
> >> drwxr-xr-x 19 jengelh users 4096 Jan 10 07:35 linux22
> >> drwxr-xr-x 19 jengelh users 4096 Jan 10 07:35 linux23
> >> drwxr-xr-x 20 jengelh users 4096 Jan 10 07:35 linux24
> >> drwxr-xr-x 21 jengelh users 4096 Jan 10 07:36 linux25
> >> drwxr-xr-x 21 jengelh users 4096 Jan 10 07:36 linux26
> >> drwxr-xr-x 22 jengelh users 4096 Jan 10 07:37 linux27
> >> drwxr-xr-x 22 jengelh users 4096 Jan 10 07:37 linux28
> >
> >ENOSPC, sorry :)
> 
> Ah heh, could be a cause. Even so, there is still "plenty" of
> space (loop1 with btrfs is also 4184064K in size):
(Continue reading)

Sage Weil | 3 Mar 2009 20:00
Favicon
Gravatar

Re: [PATCH] btrfs: flushoncommit mount option

...and this one!

thanks-
sage

On Fri, 23 Jan 2009, Sage Weil wrote:

> Hi Chris-
> 
> Here's a simpler version of the patch that drops the unrelated sync_fs 
> stuff.
> 
> thanks-
> sage
> 
> 
> The 'flushoncommit' mount option forces any data dirtied by a write in a
> prior transaction to commit as part of the current commit.  This makes
> the committed state a fully consistent view of the file system from the
> application's perspective (i.e., it includes all completed file system
> operations).  This was previously the behavior only when a snapshot is
> created.
> 
> This is used by Ceph to ensure that completed writes make it to the
> platter along with the metadata operations they are bound to (by
> BTRFS_IOC_TRANS_{START,END}).
> 
> Signed-off-by: Sage Weil <sage <at> newdream.net>
> ---
>  fs/btrfs/ctree.h       |    1 +
(Continue reading)

Sage Weil | 3 Mar 2009 20:00
Favicon
Gravatar

Re: [PATCH] btrfs: notreelog mount option

Hi Chris-

Just pinging you on this patch...

On Fri, 23 Jan 2009, Sage Weil wrote:

> Add a 'notreelog' mount option to disable the tree log (used by fsync,
> O_SYNC writes).
> 
> Signed-off-by: Sage Weil <sage <at> newdream.net>
> ---
>  fs/btrfs/ctree.h    |    1 +
>  fs/btrfs/super.c    |    8 +++++++-
>  fs/btrfs/tree-log.c |    4 ++++
>  3 files changed, 12 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
> index de103a8..471fa67 100644
> --- a/fs/btrfs/ctree.h
> +++ b/fs/btrfs/ctree.h
>  <at>  <at>  -950,6 +950,7  <at>  <at>  struct btrfs_root {
>  #define BTRFS_MOUNT_SSD			(1 << 3)
>  #define BTRFS_MOUNT_DEGRADED		(1 << 4)
>  #define BTRFS_MOUNT_COMPRESS		(1 << 5)
> +#define BTRFS_MOUNT_NOTREELOG           (1 << 6)
>  
>  #define btrfs_clear_opt(o, opt)		((o) &= ~BTRFS_MOUNT_##opt)
>  #define btrfs_set_opt(o, opt)		((o) |= BTRFS_MOUNT_##opt)
> diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
> index 4c0b756..d8c664c 100644
(Continue reading)


Gmane