On sun, 24 Feb 2013 21:49:55 +0200, Alex Lyakas wrote:
> Hi Miao,
> can you please explain your solution a bit more.
>
> On Wed, Feb 20, 2013 at 11:16 AM, Miao Xie wrote:
>> Now btrfs_commit_transaction() does this
>>
>> ret = btrfs_run_ordered_operations(root, 0)
>>
>> which async flushes all in
On Mon, Feb 25, 2013 at 12:04:42PM +0800, Liu Bo wrote:
> Before we forced to change a file's NOCOW and COMPRESS flag due to
> the parent directory's, but this ends up a bad idea, because it
> confuses end users a lot about file's NOCOW status, eg. if someone
> change a file to NOCOW via 'chattr' a
On Mon, Feb 25, 2013 at 12:23:03PM +0800, Miao Xie wrote:
> Onmon, 25 Feb 2013 11:50:01 +0800, Liu Bo wrote:
> > On Fri, Feb 22, 2013 at 11:04:40PM +0100, David Sterba wrote:
> >> On Fri, Feb 22, 2013 at 05:34:47PM +0800, Miao Xie wrote:
> >>> Onfri, 22 Feb 2013 16:40:35 +0800, Liu Bo w
On Sat, Feb 23, 2013 at 03:14:56PM +, Tomasz Kusmierz wrote:
> Question is pretty simple:
>
> "How to change node size and leaf size on previously created partition?"
>
> Now, I know what most people will say: "you should've be smarter while
> typing mkfs.btrfs". Well, I'm intending to conver
From: Wang Shilong
qgroupid(u64) is splitted into two parts:
1) the lower 48 bit are used to represent id
2) the higher 16 bit are used to represent level
So the check for id and level are necessary.
Signed-off-by: Wang Shilong
---
qgroup.c |4 ++--
1 files changed, 2 inse
From: Wang Shilong
To implement a strict hierarchy quota, qgroup level 0
should not be allowed to create/destroy by users.
Signed-off-by: Wang Shilong
---
cmds-qgroup.c |5 +
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/cmds-qgroup.c b/cmds-qgroup.c
index 26f0ab0..065
From: Wang Shilong
Not only the operation 'create/assign' may fail but also
'destroy/remove' operation, so add those operations in
error messages.
Signed-off-by: Wang Shilong
---
cmds-qgroup.c |8
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/cmds-qgroup.c b/cmds-
From: Wang Shilong
See the below warning info:
warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
Signed-off-by: Wang Shilong
---
btrfs-list.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/btrfs-list.c b/btrfs-list.c
index d02d620..2eee4
From: Wang Shilong
As we implement the strict hierarchy quota in the userspace,
it is sufficient to check this ruler in the userspace.remove
the special check for qgroup 0.
Signed-off-by: Wang Shilong
---
fs/btrfs/ioctl.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/fs/btrfs/ioctl.c
(add Miao to CC)
On Mon, Feb 25, 2013 at 12:04:42PM +0800, Liu Bo wrote:
> Before we forced to change a file's NOCOW and COMPRESS flag due to
> the parent directory's, but this ends up a bad idea, because it
> confuses end users a lot about file's NOCOW status, eg. if someone
> change a file to NOC
Thanks again Josef.
I understood that cow_file_range is called for a regular file. Just to
clarify, in cow_file_range is cow done at the time of reserving
extents in the extent btree for the io to be done in this delalloc? I
see the following comment above find_free_extent() which is called
while
On Mon, Feb 25, 2013 at 08:15:40AM -0700, Aastha Mehta wrote:
> Thanks again Josef.
>
> I understood that cow_file_range is called for a regular file. Just to
> clarify, in cow_file_range is cow done at the time of reserving
> extents in the extent btree for the io to be done in this delalloc? I
>
On 02/25/2013 06:30 AM, Wang Shilong wrote:
From: Wang Shilong
As we implement the strict hierarchy quota in the userspace,
it is sufficient to check this ruler in the userspace.remove
the special check for qgroup 0.
I haven't done any kernel coding so I'm curious, but is this a safe
change?
> I updates my previous patches [1] to add support for raid5/6.
> These patches update the btrfs fi df command and add two new commands:
> - btrfs filesystem disk-usage
> - btrfs device disk-usage
This seems like a ton of code.
Here's a thought experiment: What's the smallest possible change th
On Sun, Feb 24, 2013 at 09:04:42PM -0700, Liu Bo wrote:
> Before we forced to change a file's NOCOW and COMPRESS flag due to
> the parent directory's, but this ends up a bad idea, because it
> confuses end users a lot about file's NOCOW status, eg. if someone
> change a file to NOCOW via 'chattr' a
Ah okay, I now see how it works. Thanks a lot for your response.
Regards,
Aastha.
On 25 February 2013 18:27, Josef Bacik wrote:
> On Mon, Feb 25, 2013 at 08:15:40AM -0700, Aastha Mehta wrote:
>> Thanks again Josef.
>>
>> I understood that cow_file_range is called for a regular file. Just to
>>
On Fri, Feb 22, 2013 at 09:54:08PM -0700, Mace Moneta wrote:
> On Fri, Feb 22, 2013 at 2:40 PM, Josef Bacik wrote:
> > On Fri, Feb 22, 2013 at 11:31:07AM -0700, Mace Moneta wrote:
> >> On Fri, Feb 22, 2013 at 1:16 PM, Mace Moneta wrote:
> >> > On Fri, Feb 22, 2013 at 1:10 PM, Josef Bacik wrote:
On Mon, Feb 25, 2013 at 2:12 PM, Josef Bacik wrote:
>
> Is there any chance you got the line above [ cut here ]? (I hate that stupid
> [
> cut here ], it makes us miss all the usefull info.) Thanks,
>
> Josef
There was really nothing significant above the 'cut here'. Here it is
with over an
On Mon, Feb 25, 2013 at 12:21:30PM -0700, Mace Moneta wrote:
> On Mon, Feb 25, 2013 at 2:12 PM, Josef Bacik wrote:
>
> >
> > Is there any chance you got the line above [ cut here ]? (I hate that
> > stupid [
> > cut here ], it makes us miss all the usefull info.) Thanks,
> >
> > Josef
>
> The
Hi Eric,
On 02/25/2013 03:20 AM, Eric Sandeen wrote:
> On 2/23/13 7:46 AM, Goffredo Baroncelli wrote:
>> From: Goffredo Baroncelli
>>
>> This patch adds some helpers to manage the strings allocation and
>> deallocation.
>> The function string_list_add(char *) adds the passed string to a list;
>>
>printf("Disk size:\t\t%*s\n", width,
> df_pretty_sizes(total_disk, mode));
>
> it would be translated (note the '%*s'):
>
>if (mode == DF_HUMAN_UNIT)
> printf("Disk size:\t\t%*s%s\n", width-2,
> df_pretty_sizes_number(total_disk),
> df_pretty_
On Mon, Feb 25, 2013 at 01:31:45PM +0800, Anand Jain wrote:
> Generally snapshots are machine generated, so at any point in time
> if a sysadmin looks at a list of snapshots there should be some
> info about the snapshots to indicate purpose of it being created.
I still can't see what benefits
On 02/25/2013 09:19 PM, Zach Brown wrote:
>>printf("Disk size:\t\t%*s\n", width,
>> df_pretty_sizes(total_disk, mode));
>>
>> it would be translated (note the '%*s'):
>>
>>if (mode == DF_HUMAN_UNIT)
>> printf("Disk size:\t\t%*s%s\n", width-2,
>> df_pretty_sizes_
fdres is initialized to -1, then later tested, but never
set. Just remove it.
Signed-off-by: Eric Sandeen
---
cmds-device.c |3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/cmds-device.c b/cmds-device.c
index 198ad68..58df6da 100644
--- a/cmds-device.c
+++ b/cmds-devic
in btrfs_get_subvol(), there is a cut and paste error:
if (ri->full_path)
the_ri->full_path = strdup(ri->full_path);
else
the_ri->name = NULL;
It should be setting the_ri->full_path to NULL here.
Do it in a function instead of the cpoy & paste to avoid
open() returns a negative fd on failure, not 0.
Signed-off-by: Eric Sandeen
---
cmds-replace.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cmds-replace.c b/cmds-replace.c
index d14c9b5..9397396 100644
--- a/cmds-replace.c
+++ b/cmds-replace.c
@@ -235,7 +235,7 @@ sta
If we retry opening the mountpoint and fail, we'll call
close on a filehandle w/ value -1. Rearrange so the
retry uses the same open and same error handling.
Signed-off-by: Eric Sandeen
---
cmds-scrub.c | 13 +
1 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/cmds-sc
check_mounted returns a negative errno, so it needs to be flipped
again before passing to strerror.
Signed-off-by: Eric Sandeen
---
cmds-restore.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cmds-restore.c b/cmds-restore.c
index 12b2188..9385042 100644
--- a/cmds-re
A bunch of Coverity static analysis checker fixes, including
a couple actual bugfixes.
This gets it down from around 80 defects to about 50; I have a couple
other patches I need to clean up which quiets it even more.
By getting it to a tolerable level, subsequent runs to check for
regressions & n
cmds-qgroup.c contained a parse_limit() function which
duplicates much of the functionality of parse_size.
The only unique behavior is to handle "none"; then we
can just pass it off to parse_size().
Signed-off-by: Eric Sandeen
---
cmds-qgroup.c | 44 ++--
Free the memory allocated to "multi" before the error
exit in read_whole_eb(). Set it to NULL after we free
it in the loop to avoid any potential double-free.
Signed-off-by: Eric Sandeen
---
disk-io.c |6 +-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/disk-io.c b/disk
Whitespace fixes and fix a variable declaration after
code.
Signed-off-by: Eric Sandeen
---
btrfs-list.c | 13 -
1 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/btrfs-list.c b/btrfs-list.c
index 8c3f84d..a748d5e 100644
--- a/btrfs-list.c
+++ b/btrfs-list.c
@@ -564,15
The coverity had a false positive complaining that save_ptr
is uninitialized in the call to strtok_r.
We could initialize it, but Zach points out that just using
strsep is a lot simpler if there's only one delimiter,
so just switch to that.
Signed-off-by: Eric Sandeen
---
cmds-balance.c | 12
Rearrange cmd_subvol_set_default() slightly so we
don't have to close the fd on an error return.
While we're at it, fix whitespace & remove magic
return values.
Signed-off-by: Eric Sandeen
---
cmds-subvolume.c | 17 +
1 files changed, 9 insertions(+), 8 deletions(-)
diff --gi
If we exit with error we must free the allocated memory
to avoid a leak.
Signed-off-by: Eric Sandeen
---
btrfs-list.c |8 ++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/btrfs-list.c b/btrfs-list.c
index 851c059..8c3f84d 100644
--- a/btrfs-list.c
+++ b/btrfs-list.c
@@
In the error case where fd < 0, close(fd) is the wrong
thing to do.
Signed-off-by: Eric Sandeen
---
btrfs-show-super.c |1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/btrfs-show-super.c b/btrfs-show-super.c
index 3614c52..f587f10 100644
--- a/btrfs-show-super.c
+++ b/btr
__btrfs_map_block() can possibly do the goto again: loop after
having allocated & freed the "multi" pointer. There are then
a couple error conditions where it will attempt to again kfree
the now non-NULL multi pointer. So before retrying, reset
multi to NULL after we free it.
Signed-off-by: Eric
btrfs_list_get_path_rootid() tries to return a negative
number on error, but it's a u64 function. Callers which test
for a return < 0 will never see an error.
Change the function to fill in the rootid via a pointer,
and then return a simple int as error.
Signed-off-by: Eric Sandeen
---
btrfs-l
If we request scrub cancel on an unmounted or
non-btrfs device, we still get a "scrub canceled"
success message:
# btrfs scrub cancel /dev/loop1
scrub cancelled
# blkid /dev/loop1
/dev/loop1: UUID="7f586941-1d5e-4ba7-9caa-b35934849957" TYPE="xfs"
Fix this so that if check_mounted_where returns 0
We only freed this allocation in error paths, and leaked
a bit when it went out of scope normally.
Signed-off-by: Eric Sandeen
---
cmds-replace.c |1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/cmds-replace.c b/cmds-replace.c
index 9397396..4cc32df 100644
--- a/cmds-repl
Without this we leak the fd when we return from the
function.
Also, remove the senseless random return values.
Signed-off-by: Eric Sandeen
---
cmds-subvolume.c | 20
1 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/cmds-subvolume.c b/cmds-subvolume.c
index
> case 'e':
> mult *= 1024;
> + /* Fallthrough */
These comments still annoy me :). And really, that code kind of annoys
me too. That's a lot of duplicated code for a mapping of characters to
powers of 1024.
How about..
u64 pow_u64(u64 x
Hi,
I think it would be great if there is a lvm volume or zfs zvol type
support in btrfs. As far as I can tell, there's nobody actively
working on this feature. I want to know what the core developers think
of this feature, is it technically possible? any strong opinions?
implementation ideas?
I'
On 2/25/13 5:26 PM, Zach Brown wrote:
>> case 'e':
>> mult *= 1024;
>> +/* Fallthrough */
>
> These comments still annoy me :).
it shuts up coverity & other static checkers which are worried about
a missing break...
> And really, that code
On 2013/02/21 0:37, Stefan Behrens wrote:
On Thu, 14 Feb 2013 12:30:03 -0600, Eric Sandeen wrote:
The core of this is shamelessly stolen from xfsprogs.
Use blkid to detect an existing filesystem or partition
table on any of the target devices. If something is found,
require the '-f' option to
On Mon, Feb 25, 2013 at 01:56:47PM -0500, Josef Bacik wrote:
> On Sun, Feb 24, 2013 at 09:04:42PM -0700, Liu Bo wrote:
> > Before we forced to change a file's NOCOW and COMPRESS flag due to
> > the parent directory's, but this ends up a bad idea, because it
> > confuses end users a lot about file's
On 2/25/13 5:39 PM, Tsutomu Itoh wrote:
> On 2013/02/21 0:37, Stefan Behrens wrote:
>> On Thu, 14 Feb 2013 12:30:03 -0600, Eric Sandeen wrote:
>>> The core of this is shamelessly stolen from xfsprogs.
>>>
>>> Use blkid to detect an existing filesystem or partition
>>> table on any of the target dev
> > These comments still annoy me :).
>
> it shuts up coverity & other static checkers which are worried about
> a missing break...
Yeah, I know. And it's annoying! So my little brain fart there was an
attempt to use a construct that simply couldn't be confused with
mistakes that'd require co
Hello, Eric
2013/2/26 Eric Sandeen :
> If we exit with error we must free the allocated memory
> to avoid a leak.
>
> Signed-off-by: Eric Sandeen
> ---
> btrfs-list.c |8 ++--
> 1 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/btrfs-list.c b/btrfs-list.c
> index 851c059.
On 25 February 2013 23:35, Suman C wrote:
> Hi,
>
> I think it would be great if there is a lvm volume or zfs zvol type
> support in btrfs. As far as I can tell, there's nobody actively
> working on this feature. I want to know what the core developers think
> of this feature, is it technically po
On Tue, Feb 26, 2013 at 11:59 AM, Mike Fleetwood
wrote:
> On 25 February 2013 23:35, Suman C wrote:
>> Hi,
>>
>> I think it would be great if there is a lvm volume or zfs zvol type
>> support in btrfs.
> Btrfs already has capabilities to add and remove block devices on the
> fly. Data can be s
On 2013/02/26 9:07, Eric Sandeen wrote:
On 2/25/13 5:39 PM, Tsutomu Itoh wrote:
On 2013/02/21 0:37, Stefan Behrens wrote:
On Thu, 14 Feb 2013 12:30:03 -0600, Eric Sandeen wrote:
The core of this is shamelessly stolen from xfsprogs.
Use blkid to detect an existing filesystem or partition
table
On 2/25/13 9:55 PM, Tsutomu Itoh wrote:
> On 2013/02/26 9:07, Eric Sandeen wrote:
>> On 2/25/13 5:39 PM, Tsutomu Itoh wrote:
>>> On 2013/02/21 0:37, Stefan Behrens wrote:
On Thu, 14 Feb 2013 12:30:03 -0600, Eric Sandeen wrote:
> The core of this is shamelessly stolen from xfsprogs.
>
>
On 2013/02/26 13:06, Eric Sandeen wrote:
On 2/25/13 9:55 PM, Tsutomu Itoh wrote:
On 2013/02/26 9:07, Eric Sandeen wrote:
On 2/25/13 5:39 PM, Tsutomu Itoh wrote:
On 2013/02/21 0:37, Stefan Behrens wrote:
On Thu, 14 Feb 2013 12:30:03 -0600, Eric Sandeen wrote:
The core of this is shamelessly s
On 2/25/13 6:36 PM, Shilong Wang wrote:
> Hello, Eric
>
> 2013/2/26 Eric Sandeen :
>> If we exit with error we must free the allocated memory
>> to avoid a leak.
>>
>> Signed-off-by: Eric Sandeen
>> ---
>> btrfs-list.c |8 ++--
>> 1 files changed, 6 insertions(+), 2 deletions(-)
>>
>> di
Yes, zvol like feature where a btrfs subvolume like construct can be
made available as a LUN/block device. This device can then be used by
any application that wants a raw block device. iscsi is another
obvious usecase. Having thin provisioning support would make it pretty
awesome.
Suman
On Mon,
Can't thus be done with a regular file and a loop back device?
Remco
On 26 Feb 2013, at 06:35, Suman C wrote:
> Yes, zvol like feature where a btrfs subvolume like construct can be
> made available as a LUN/block device. This device can then be used by
> any application that wants a raw block d
On Mon, 25 Feb 2013 21:35:08 -0800
Suman C wrote:
> Yes, zvol like feature where a btrfs subvolume like construct can be
> made available as a LUN/block device. This device can then be used by
> any application that wants a raw block device. iscsi is another
> obvious usecase. Having thin provisi
Thanks for the sparse file idea, I am actually using that solution
already. I am not sure if its the best way, however.
Suman
On Mon, Feb 25, 2013 at 9:57 PM, Roman Mamedov wrote:
> On Mon, 25 Feb 2013 21:35:08 -0800
> Suman C wrote:
>
>> Yes, zvol like feature where a btrfs subvolume like cons
would be really cool if a TRIM to the loopback device would do a 'hole punch'
on the file
Remco
On Feb 26, 2013, at 7:25 AM, Suman C wrote:
> Thanks for the sparse file idea, I am actually using that solution
> already. I am not sure if its the best way, however.
>
> Suman
>
> On Mon, Feb 2
Remco Hosman - Yerf IT wrote:
> would be really cool if a TRIM to the loopback device would do a 'hole
> punch' on the file
There are patches on the scsi target mailing list to make this happen for
the FILEIO backend. This has the added benefit that if you set it up via
LIO, it appears as a ful
TL;DR;
WARNING: at fs/btrfs/tree-log.c:1984 walk_down_log_tree+0x51/0x307()
WARNING: at fs/btrfs/tree-log.c:1988 walk_down_log_tree+0x6c/0x307()
kernel BUG at fs/btrfs/volumes.c:3753!
It's way time for btrfs to stop crashing your system with no recovery flag
that works to clear the log if the log
On Sun, Feb 24, 2013 at 06:55:46PM -0800, Marc MERLIN wrote:
> Is this useful to anyone?
>
Hi Marc,
Thanks for the report, of course they're useful.
Could you please also show us your workloads and it'd be better to know how to
reproduce this?
thanks,
liubo
> Got this after a crash/reboot:
>
On Tue, Feb 26, 2013 at 01:25:11PM +0900, Tsutomu Itoh wrote:
> On 2013/02/26 13:06, Eric Sandeen wrote:
> >On 2/25/13 9:55 PM, Tsutomu Itoh wrote:
> >>EXPERIMENTAL... It's certainly so.
> >>However, I think that we should not add the option that it troubles
> >>a lot of people.
> >
> >Well, I sent
On Tue, Feb 26, 2013 at 07:28:43AM +0100, Remco Hosman - Yerf IT wrote:
> would be really cool if a TRIM to the loopback device would do a
> 'hole punch' on the file
dfaa2ef loop: add discard support for loop devices
--
Dave Chinner
da...@fromorbit.com
--
To unsubscribe from this list: send the
65 matches
Mail list logo