There are many places that need parse string to u64 for btrfs commands,
in fact, we do such things *too casually*, using atoi/atol/atoll..is not
right at all, and even we don't check whether it is a valid string.
Let's do everything more gracefully, we introduce a new helper
btrfs_strtoull()
Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com
---
btrfs-show-super.c | 7 ---
btrfstune.c| 4 ++--
cmds-replace.c | 7 +--
cmds-subvolume.c | 8 ++--
4 files changed, 9 insertions(+), 17 deletions(-)
diff --git a/btrfs-show-super.c b/btrfs-show-super.c
index
Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com
---
btrfs-corrupt-block.c | 38 +-
btrfs-debug-tree.c| 2 +-
btrfs-image.c | 8
btrfs-map-logical.c | 26 ++
cmds-inspect.c| 8
5 files
Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com
---
btrfs-find-root.c | 23 +++
btrfs-list.c | 14 +++---
cmds-restore.c| 20
utils.c | 2 +-
4 files changed, 11 insertions(+), 48 deletions(-)
diff --git
There are many places that need parse string to u64 for btrfs commands,
in fact, we do such things *too casually*, using atoi/atol/atoll..is not
right at all, and even we don't check whether it is a valid string.
Let's do everything more gracefully, we introduce a new helper
btrfs_strtoull()
If we fail to commit transaction, we'd better
cancel scrub operations.
Suggested-by: Miao Xie mi...@cn.fujitsu.com
Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com
---
fs/btrfs/transaction.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
commit cb7ab02156e4 cause a following deadlock found by
xfstests,btrfs/011:
Thread1 is commiting transaction which is blocked at
btrfs_scrub_pause().
Thread2 is calling btrfs_file_aio_write() which has held
inode's @i_mutex and commit transaction(blocked because
Thread1 is committing
btrfs_scrub_continue() will be called when cleaning up transaction.However,
this can only be called if btrfs_scrub_pause() is called before.
Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com
---
fs/btrfs/transaction.c | 22 +++---
1 file changed, 11 insertions(+), 11
check if @scrubs_running=@scrubs_paused condition inside wait_event()
is not an atomic operation which means we may inc/dec @scrub_running/
paused at any time. Let's wake up @scrub_pause_wait as much as we can
to let commit transaction blocked less.
An example below:
Thread1
Hello everyone,
I have a question: What exactly does the value for no_csum mean when
doing a scrub with the -R option? Example output:
sudo btrfs scrub start -BR /
scrub done for ...
...
csum_errors: 0
verify_errors: 0
no_csum: 70517
csum_discards: 87381
super_errors: 0
...
Hi,
As suggested in another thread, I would like to know the reliability of the
following backup scheme:
Suppose I have a subvolume of my homedirectory called @home.
Now I am interested in making incremental backups of data in home I am
interested in, but not everything, so I create a
The incremental send algorithm assumed that it was possible to issue
a directory remove (rmdir) if the the inode number it was currently
processing was greater than (or equal) to any inode that referenced
the directory's inode. This wasn't a valid assumption because any such
inode might be a child
Regression test for btrfs incremental send issue where a rmdir instruction
is sent against an orphan directory inode which is not empty yet, causing
btrfs receive to fail when it attempts to remove the directory.
This issue is fixed by the following linux kernel btrfs patch:
Btrfs: fix send
On Wed, 19 Feb 2014 19:17:51 +0800, Wang Shilong wrote:
There are many places that need parse string to u64 for btrfs commands,
in fact, we do such things *too casually*, using atoi/atol/atoll..is not
right at all, and even we don't check whether it is a valid string.
Let's do everything
Hello Stefan,
On Wed, 19 Feb 2014 19:17:51 +0800, Wang Shilong wrote:
There are many places that need parse string to u64 for btrfs commands,
in fact, we do such things *too casually*, using atoi/atol/atoll..is not
right at all, and even we don't check whether it is a valid string.
Let's
Hi Wang,
On 02/19/2014 12:17 PM, Wang Shilong wrote:
There are many places that need parse string to u64 for btrfs commands,
in fact, we do such things *too casually*, using atoi/atol/atoll..is not
right at all, and even we don't check whether it is a valid string.
Let's do everything more
Hi Goffredo,
Hi Wang,
On 02/19/2014 12:17 PM, Wang Shilong wrote:
There are many places that need parse string to u64 for btrfs commands,
in fact, we do such things *too casually*, using atoi/atol/atoll..is not
right at all, and even we don't check whether it is a valid string.
Let's do
Currently, btrfs balance start fails when trying to convert metadata or
system chunks to dup profile on filesystems with multiple devices. This
requires that a conversion from a multi-device filesystem to a single
device filesystem use the following methodology:
1. btrfs balance start
Hi Wang,
On 02/19/2014 05:08 PM, Wang Shilong wrote:
Hi Goffredo,
Hi Wang,
On 02/19/2014 12:17 PM, Wang Shilong wrote:
There are many places that need parse string to u64 for btrfs commands,
in fact, we do such things *too casually*, using atoi/atol/atoll..is not
right at all, and even we
Hi Goffredo,
Hi Wang,
On 02/19/2014 05:08 PM, Wang Shilong wrote:
Hi Goffredo,
Hi Wang,
On 02/19/2014 12:17 PM, Wang Shilong wrote:
There are many places that need parse string to u64 for btrfs commands,
in fact, we do such things *too casually*, using atoi/atol/atoll..is not
right
On Feb 19, 2014, at 6:45 AM, GEO 1g2e...@gmail.com wrote:
I do not like the idea of making subvolumes of all directories I am not
interested in backing up.
Why? It addresses your use case.
Chris Murphy
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of
On 2/19/14, 10:31 AM, Goffredo Baroncelli wrote:
...
The error message says that the value is out of range. But doesn't tell which
is the parameter involved.
If you have a command which has several arguments, and the user pass a string
instead of a number, the error returned doesn't tell
On Feb 19, 2014, at 10:29 AM, GEO 1g2e...@gmail.com wrote:
On Wednesday 19 February 2014 10:26:02 you wrote:
Snapshotting, deleting a bunch of directories in that snapshot, then backing
up the snapshot, then deleting the snapshot will work. But it sounds more
involved. But if you're
On Wednesday 19 February 2014 10:00:49 Chris Murphy wrote:
On Feb 19, 2014, at 6:45 AM, GEO 1g2e...@gmail.com wrote:
I do not like the idea of making subvolumes of all directories I am not
interested in backing up.
Why? It addresses your use case.
Chris Murphy
I would prefer the idea
On Tuesday 18 February 2014 15:02:51 Chris Murphy wrote:
On Feb 18, 2014, at 2:33 PM, Wolfgang Mader wolfgang_ma...@brain-frog.de
wrote:
Feb 18 13:14:09 deck kernel: ata2.00: failed command: READ DMA
Feb 18 13:14:09 deck kernel: ata2.00: cmd
c8/00:08:60:f2:30/00:00:00:00:00/e0 tag 0 dma
Chris Murphy li...@colorremedies.com schrieb:
Snapshotting, deleting a bunch of directories in that snapshot, then
backing up the snapshot, then deleting the snapshot will work. But it
sounds more involved. But if you're scripting it, probably doesn't
matter either way.
Will it work as
On 02/20/2014 01:23 AM, Eric Sandeen wrote:
On 2/19/14, 10:31 AM, Goffredo Baroncelli wrote:
...
The error message says that the value is out of range. But doesn't tell which
is the parameter involved.
If you have a command which has several arguments, and the user pass a string
instead of
There are many places that need parse string to u64 for btrfs commands,
in fact, we do such things *too casually*, using atoi/atol/atoll..is not
right at all, and even we don't check whether it is a valid string.
Let's do everything more gracefully, we introduce a new helper
arg_strtou64() which
switch to arg_strtou64 plus some cleanups to remove unnecessary
codes.
Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com
---
btrfs-find-root.c | 23 +++
btrfs-list.c | 14 +++---
cmds-restore.c| 27 +--
utils.c | 2 +-
There are many places that need parse string to u64 for btrfs commands,
in fact, we do such things *too casually*, using atoi/atol/atoll..is not
right at all, and even we don't check whether it is a valid string.
Let's do everything more gracefully, we introduce a new helper
arg_strtou64() which
Switch to new helper arg_strtou64(), also check if user assign
a valid super copy.
Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com
---
btrfs-select-super.c | 12 +---
btrfs-show-super.c | 10 +-
btrfstune.c | 4 ++--
cmds-check.c | 14 ++
Signed-off-by: Wang Shilong wangsl.f...@cn.fujitsu.com
---
btrfs-corrupt-block.c | 45 +
btrfs-debug-tree.c| 2 +-
btrfs-image.c | 12 ++--
btrfs-map-logical.c | 26 ++
cmds-inspect.c| 8
On 2/19/14, 7:30 PM, Wang Shilong wrote:
There are many places that need parse string to u64 for btrfs commands,
in fact, we do such things *too casually*, using atoi/atol/atoll..is not
right at all, and even we don't check whether it is a valid string.
Let's do everything more gracefully,
On 02/20/2014 09:39 AM, Eric Sandeen wrote:
On 2/19/14, 7:30 PM, Wang Shilong wrote:
There are many places that need parse string to u64 for btrfs commands,
in fact, we do such things *too casually*, using atoi/atol/atoll..is not
right at all, and even we don't check whether it is a valid
When exec btrfs-debug-tree as non-root user, we get a segment fault.
Because the btrfs_scan_block_devices return a success 0 when we fail
to open a device. Now we just return the errno if this case happens.
Signed-off-by: Gui Hecheng guihc.f...@cn.fujitsu.com
---
utils.c | 3 ++-
1 file changed,
When exec btrfsck as non-root user on a disk, btrfsck will always
warn that No such file or directory, despite that a directory
(e.g. /dev/vboxusb)actually exists. We just have no permission.
In this case, return the -errno set by the opendir call in
btrfs_scan_one_dir rather than blindly return
If the new version of btrfs-file-show fails, it will try to use the
old version. But before that, an error msg of the failed ioctl
shows up which causes xfstests case btrfs/006 to get a mismatch output.
I think we can just remove the error msg since the btrfs-file-show
still works with right
For btrfs-convert, btrfstune, btrfs rescue, they report device busy
when given a device that does not actually exist e.g.
# btrfstune -x abcdefg (this device does not exist)
$ ...device busy...
We deal with this case by add ret 0 error check when
judging the return value of
Kai Krakow hurikhan77+bt...@gmail.com schrieb:
Most of these directories aren't
changing anyways most of the time and thus won't occupy disk space only
once in the backup.
Of course won't should've read would... ;-)
--
Replies to list only preferred.
--
To unsubscribe from this list: send
39 matches
Mail list logo