On Tue, Apr 14, 2015 at 02:19:11PM -0400, J. Bruce Fields wrote:
On Tue, Apr 14, 2015 at 01:16:13PM -0400, Anna Schumaker wrote:
On 04/14/2015 12:53 PM, Christoph Hellwig wrote:
On Sat, Apr 11, 2015 at 09:04:02AM -0400, Jeff Layton wrote:
Yuck! How the heck do you clean up the mess if
On Tue, Apr 14, 2015 at 02:29:06PM -0400, J. Bruce Fields wrote:
On Tue, Apr 14, 2015 at 11:22:41AM -0700, Zach Brown wrote:
On Tue, Apr 14, 2015 at 02:19:11PM -0400, J. Bruce Fields wrote:
On Tue, Apr 14, 2015 at 01:16:13PM -0400, Anna Schumaker wrote:
On 04/14/2015 12:53 PM, Christoph
On Tue, Apr 14, 2015 at 12:23:25PM -0700, Christoph Hellwig wrote:
On Tue, Apr 14, 2015 at 11:54:08AM -0700, Zach Brown wrote:
Is this relying on btrfs range cloning being atomic? It certainly
doesn't look atomic. It can modify items across an arbitrarily large
number of leaf blocks
Could we perhaps instead of a length, define a 'pos_in_start' and a
'pos_in_end' offset (with the latter being -1 for a full-file copy)
and then return an 'loff_t' value stating where the copy ended?
Well, the resulting offset will be set if the caller provided it. So
they could
Add sys_copy_file_range to the x86 syscall tables.
Signed-off-by: Zach Brown z...@redhat.com
---
arch/x86/syscalls/syscall_32.tbl | 1 +
arch/x86/syscalls/syscall_64.tbl | 1 +
2 files changed, 2 insertions(+)
diff --git a/arch/x86/syscalls/syscall_32.tbl b/arch/x86/syscalls/syscall_32.tbl
Hello everyone!
Here's my current attempt at the most basic system call interface for
offloading copying between files. The system call and vfs function
are relatively light wrappers around the file_operation method that
does the heavy lifting.
There was interest at LSF in getting the basic
on an existing destination file
descriptor, not a path.
Currently the high level vfs entry point limits copy offloading to files
on the same mount and super (and not in the same file). This can be
relaxed if we get implementations which can copy between file systems
safely.
Signed-off-by: Zach Brown z
-off-by: Zach Brown z...@redhat.com
---
fs/btrfs/ctree.h | 3 ++
fs/btrfs/file.c | 1 +
fs/btrfs/ioctl.c | 91
3 files changed, 56 insertions(+), 39 deletions(-)
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index f9c89ca..f7cfa26 100644
On Fri, Apr 10, 2015 at 06:36:41PM -0400, Trond Myklebust wrote:
On Fri, Apr 10, 2015 at 6:00 PM, Zach Brown z...@redhat.com wrote:
+
+/*
+ * copy_file_range() differs from regular file read and write in that it
+ * specifically allows return partial success. When it does so is up
We've known for eons that it's not great that readdir holds tree locks
while calling mkwrite by way of dir_emit(). I fiddled around and found
a reliable if goofy deadlock reproducer. It typically takes a few
seconds on modest hardware here (single package, dual core/ht, single
spindle.)
I made
, before gdm is started.
I'm inclined to agree.
This makes the tiniest change to remove the message that's output for an
auto invocation. My guess is that it was just copied from the xfs
fsck.xfs and that no one actually cares about it.
Signed-off-by: Zach Brown z...@zabbo.net
---
fsck.btrfs | 4
.
Cool,
Reviewed-by: Zach Brown z...@zabbo.net
- z
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Mar 19, 2015 at 04:31:08PM -0400, Josef Bacik wrote:
This creates a new target that is meant for file system developers to test
file
system integrity at particular points in the life of a file system.
Hi Josef, just a quick drive-by review for stuff that jumps out at me..
+
@@ -5729,6 +5744,7 @@ static struct inode *btrfs_new_inode(struct
btrfs_trans_handle *trans,
struct btrfs_path *path;
struct btrfs_inode_ref *ref;
struct btrfs_key key[2];
+ struct timespec current_time;
u32 sizes[2];
int nitems = name ? 2 : 1;
On Thu, Jan 15, 2015 at 12:24:41PM +0100, David Sterba wrote:
On Wed, Jan 14, 2015 at 02:27:17PM -0800, Zach Brown wrote:
On Wed, Jan 14, 2015 at 04:06:02PM -0500, Sandy McArthur Jr wrote:
Sometimes btrfs scrub status reports that is not running when it still is.
I think
On Wed, Jan 14, 2015 at 04:06:02PM -0500, Sandy McArthur Jr wrote:
Sometimes btrfs scrub status reports that is not running when it still is.
I think this a cosmetic bug. And I believe this is related to the
scrub completing on some drives before others in a multi-drive btrfs
filesystem that
On Fri, Nov 21, 2014 at 05:00:31PM -0500, Josef Bacik wrote:
Hello,
I'm hoping some FS guys can weigh in and verify my approach for testing power
fail conditions, and the DM guys to of course verify I didn't completely fail
at
making a DM target. All suggestions welcome, I want to have a
This implements a writeback cache in kernel data structures so that you
can race to throw away cached blocks that haven't been flushed. How is
that meaningfully different than using an actual writeback caching dm
target and racing to invalidate it?
I didn't think of the dm-cache target,
On Mon, Nov 24, 2014 at 03:15:25PM -0500, Josef Bacik wrote:
On 11/24/2014 02:57 PM, Zach Brown wrote:
This implements a writeback cache in kernel data structures so that you
can race to throw away cached blocks that haven't been flushed. How is
that meaningfully different than using
That is way complicated, I was just going to take two devices, one that's a
linear mapping and the other that's the log, and then write to the log the
sector+data that was written in order that it completes, and then have
userspace do the replay. So basically do the flush tracking like I am,
On Tue, Oct 14, 2014 at 10:18:09PM +0200, Fabian Frederick wrote:
On 14 October 2014 at 21:15 Zach Brown z...@zabbo.net wrote:
On Tue, Oct 14, 2014 at 07:46:14PM +0200, Fabian Frederick wrote:
use function defined in include/linux/highmem.h
Note that this reverts 2 last function
coverity warned that the return code from sscanf() assigned to 'i'
wasn't checked before being assigned again. Check it.
Signed-off-by: Zach Brown z...@zabbo.net
---
utils.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/utils.c b/utils.c
index c2f30d4..51e55be 100644
Hi gang,
Here's another set of coverity fixes for btrfs-progs against David's
integration-20141007 branch.
I got tired of adding error checking after a few so I moved on to the
other warnings. Maybe we should subscribe linux-btrfs to the reports
that coverity can send out?
- z
--
To
btrfs_setup_all_roots() had some copy and pasted code for trying to
setup a root and then creating a blank node if that failed. The copy
for the csum_root created the blank node in the extent_root.
So we create a function to use a consistent root.
Signed-off-by: Zach Brown z...@zabbo.net
pread
errors instead of -EIO or -1 (-EPERM). The only other caller who tests
errors clobbers them with -EIO.
Signed-off-by: Zach Brown z...@zabbo.net
---
btrfs-map-logical.c | 12 +++-
extent_io.c | 4 +++-
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/btrfs-map
the unknown flag first.
Signed-off-by: Zach Brown z...@zabbo.net
---
btrfs-show-super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/btrfs-show-super.c b/btrfs-show-super.c
index 456dbd8..2b48f44 100644
--- a/btrfs-show-super.c
+++ b/btrfs-show-super.c
@@ -324,8 +324,8 @@ static
On Tue, Oct 14, 2014 at 07:46:14PM +0200, Fabian Frederick wrote:
use function defined in include/linux/highmem.h
Note that this reverts 2 last function call order
And adds a BUG_ON(PAGE_CACHE_SIZE PAGE_SIZE). We can take bets on
whether that will ever trigger.
- z
--
To unsubscribe from
/kdave/linux.git
remove-unlikely
David Sterba (2):
btrfs: remove unlikely from NULL checks
btrfs: remove unlikely from data-dependent branches and slow paths
Enthusiastically-Reviewed-by: Zach Brown z...@zabbo.net
- z
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs
btrfs_setup_all_roots(). Please test if it fixes the crash with the
corrupted image you have. Thanks.
Perhaps with a test in xfstests.
- z
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at
On Tue, Sep 30, 2014 at 03:01:40PM -0700, Omar Sandoval wrote:
write_buf used by btrfs send has what is more or less a reimplementation of
kernel_write. This also gets rid of a sparse address space warning.
Seems reasonable to me:
Reviewed-by: Zach Brown z...@zabbo.net
- z
--
To unsubscribe
--- a/btrfs-image.c
+++ b/btrfs-image.c
@@ -1020,6 +1020,9 @@ static int copy_tree_blocks(struct btrfs_root *root,
struct extent_buffer *eb,
int i = 0;
int ret;
+ if (btrfs_header_bytenr(eb) == 65536)
+ printf(We have bytenr 65536, belongs to %llu, level
On Fri, Sep 19, 2014 at 01:51:22PM +, Holger Hoffstätte wrote:
On Fri, 19 Sep 2014 13:18:34 +0100, Rob Spanton wrote:
I have a particularly uncomplicated setup (a desktop PC with a hard
disk) and I'm seeing particularly slow performance from btrfs. A `git
status` in the linux
On Wed, Sep 17, 2014 at 04:54:48AM +0100, Al Viro wrote:
On Tue, Sep 16, 2014 at 11:05:00PM -0400, Shea Levy wrote:
Hi all,
What work would be required to mark btrfs_fs_type with FS_USERNS_MOUNT
so that btrfs images can be mounted by unprivileged users within a user
namespace (along
Great! Thanks Zach for your quick patch. it works.
Cool.
From 3d132362f4c87b065b63cb38726a030db2277919 Mon Sep 17 00:00:00 2001
From: Zach Brown z...@zabbo.net
Date: Thu, 4 Sep 2014 12:32:00 -0700
Subject: [PATCH] btrfs-progs: use pretty printing macros
David, let me know if you want me
3d132362f4c87b065b63cb38726a030db2277919 Mon Sep 17 00:00:00 2001
From: Zach Brown z...@zabbo.net
Date: Thu, 4 Sep 2014 12:32:00 -0700
Subject: [PATCH] btrfs-progs: use pretty printing macros
The original pretty printing code was a mess and required callers to
allocate and free buffers for each argument. The obvious
another #if 0-ed out caller in extent-tree.c but that nonsense
should just be removed.
- z
commit 69a668994c70cc1fd86d1c349d272b1cbfde23b1
Author: Zach Brown z...@zabbo.net
Date: Wed Aug 27 11:07:23 2014 -0700
btrfs-progs: kill BUG_ON in readahead_tree_block()
David sent a quick patch
It's trivial to write this as a bunch of helper functions and then
boiler-plate the actual tests themselves. There will be little
difference in terms of run time, but we get much more fine-grained
control of execution and reporting
Sure, that's reasonable, given the xfstests
they were on a platform that corrupts unaligned userspace
loads. Loading the u64s from the unaligned pointers into the received
command stream with get_unaligned() fixed the problem.
Reported-By: Klaus Holler k...@gmx.at
Tested-By: Klaus Holler k...@gmx.at
Signed-off-by: Zach Brown z...@zabbo.net
On Thu, Aug 21, 2014 at 09:03:16PM +0200, Klaus Holler wrote:
Hello Hugo and Zach!
a big thanks to both of you!
Both Hugo's userspace workaround and
Zach's patch work fine for me - the /boot snapshot can be restored
completely as expected :-)
Cool, glad to hear it. I sent a proper patch
On Thu, Aug 21, 2014 at 01:33:48AM +0800, Eryu Guan wrote:
This patchset add new stress test cases for btrfs by running two
different btrfs operations simultaneously under fsstress to ensure
btrfs doesn't hang or oops in such situations. btrfs scrub and
btrfs check will be run after each test.
On Tue, Aug 19, 2014 at 11:32:16AM +0800, Eryu Guan wrote:
Hi,
Description of the problem:
mount btrfs with selinux context, then create a subvolume, the new
subvolume cannot be mounted, even with the same context.
mkfs -t btrfs /dev/sda5
mount -o context=system_u:object_r:nfs_t:s0
On Sun, Aug 17, 2014 at 02:44:34PM +0200, Klaus Holler wrote:
Hello list,
I want to use an ARM kirkwood based NSA325v2 NAS (dubbed Receiver) for
receiving btrfs snapshots done on several hosts, e.g. a Core Duo laptop
running kubuntu 14.04 LTS (dubbed Source), storing them on a 3TB WD
red
Hello Zach,
Here's an untested patch which
Try testing it. It's easy with virtualization and xfstests.
You'll find that sending to a file fails because each individual file
write call that makes up a send starts at offset 0 -- at the start of
the file.
Getting this
On Sat, Aug 02, 2014 at 02:24:49PM +0200, Fabian Frederick wrote:
On Thu, 17 Jul 2014 12:01:52 -0700
Zach Brown z...@zabbo.net wrote:
@@ -515,7 +515,8 @@ static int write_buf(struct file *filp, const
void *buf,
u32 len, loff_t *off)
Though this probably wants
On Fri, Aug 01, 2014 at 06:12:37PM -0500, Eric Sandeen wrote:
Reading the quota tree root may fail with ENOENT
if there is no quota, which is fine, but the code was
ignoring every other error as well, which is not fine.
Kinda makes you want to write a test that would have caught this.
Kinda.
On Mon, Aug 04, 2014 at 01:42:23PM -0500, Eric Sandeen wrote:
On 8/4/14, 1:35 PM, Zach Brown wrote:
On Fri, Aug 01, 2014 at 06:12:37PM -0500, Eric Sandeen wrote:
Reading the quota tree root may fail with ENOENT
if there is no quota, which is fine, but the code was
ignoring every other
On Wed, Jul 30, 2014 at 04:47:12PM -0400, Josef Bacik wrote:
On 07/30/2014 04:42 PM, Nicholas Krause wrote:
This patch removes the lines for releasing the page cache in certain
files as this may aid in perfomance with writes in the compression
rountines of btrfs. Please note that this patch
On Thu, Jul 24, 2014 at 11:27:32PM -0500, Eric Sandeen wrote:
make_btrfs() rounds down the first device size to a multiple of sectorsize:
^^^
- device-total_bytes = block_count;
+ device-total_bytes = (block_count / sectorsize) * sectorsize;
On Wed, Jul 23, 2014 at 02:10:29PM -0600, Chris Murphy wrote:
The use case is when it's possible to mount a Btrfs volume ro, but not rw.
Example, a situation where
# mount -o degraded /dev/sdb /mnt
[ 71.064352] BTRFS info (device sdb): allowing degraded mounts
[ 71.064812] BTRFS info
@@ -515,7 +515,8 @@ static int write_buf(struct file *filp, const void
*buf,
u32 len, loff_t *off)
Though this probably wants to be rewritten in terms of kernel_write().
That'd give an opportunity to get rid of the sctx-send_off and have it
use f_pos in the filp.
Do you mean
char *
We can safely use (const char __user *) with set_fs(KERNEL_DS)
Yeah, that cast is correct.
Reviewed-by: Zach Brown z...@zabbo.net
@@ -515,7 +515,8 @@ static int write_buf(struct file *filp, const void *buf,
u32 len, loff_t *off)
Though this probably wants to be rewritten in terms
of whether
to modify the device before the size test or whether or zero regions
that have been trimmed.
Finally, the error handling mess after the zeroing calls is cleaned up.
zero_blocks() and its callers only return -errno.
Signed-off-by: Zach Brown z...@zabbo.net
---
utils.c | 58
On Thu, Jul 10, 2014 at 10:36:14AM -0700, Mark Fasheh wrote:
On Thu, Jul 10, 2014 at 10:43:30AM +1000, Dave Chinner wrote:
On Wed, Jul 09, 2014 at 03:41:50PM -0700, Mark Fasheh wrote:
+
+# Enable qgroups now that we have our filesystem prepared. This
+# will kick off a scan which we
On Thu, Jul 10, 2014 at 12:00:55PM -0700, Mark Fasheh wrote:
On Thu, Jul 10, 2014 at 11:32:28AM -0700, Zach Brown wrote:
On Thu, Jul 10, 2014 at 10:36:14AM -0700, Mark Fasheh wrote:
On Thu, Jul 10, 2014 at 10:43:30AM +1000, Dave Chinner wrote:
On Wed, Jul 09, 2014 at 03:41:50PM -0700
On Mon, Jun 23, 2014 at 11:28:00AM +0100, Filipe David Borba Manana wrote:
In btrfs the block size (called sector size in btrfs) can not be
smaller then the page size.
Nor larger.
commit 8d082fb727ac11930ea20bf1612e334ea7c2b697
Author: Liu Bo liubo2...@cn.fujitsu.com
Date: Tue Apr 3 09:56:53
On Fri, May 09, 2014 at 03:58:00PM +0200, David Sterba wrote:
On Thu, May 08, 2014 at 07:16:19PM -0400, Zach Brown wrote:
uncompress_inline() is silently dropping an error from
btrfs_decompress() after testing it and zeroing the page that was
supposed to hold decompressed data. This can
On Fri, May 09, 2014 at 04:45:05PM -0400, Josef Bacik wrote:
On 05/08/2014 07:34 PM, Zach Brown wrote:
+#ifdef CONFIG_BTRFS_FS_REF_VERIFY
+int btrfs_build_ref_tree(struct btrfs_fs_info *fs_info);
+void btrfs_free_ref_cache(struct btrfs_fs_info *fs_info);
+int btrfs_ref_tree_mod(struct
on the error without having to guess what happened.
ENOMEM for allocation failure, E2BIG when compression exceeds the
uncompressed input, and EIO for everything else.
This helps a future path return errors from btrfs_decompress().
Signed-off-by: Zach Brown z...@redhat.com
---
fs/btrfs/lzo.c | 14
btrfs_decompress() but not from the allocation error a few lines
above. So the page zeroing is removed.
Signed-off-by: Zach Brown z...@redhat.com
Reviewed-by: David Sterba dste...@suse.cz
---
fs/btrfs/inode.c | 15 +--
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/fs/btrfs
On Fri, May 09, 2014 at 03:39:26PM +0200, David Sterba wrote:
On Thu, May 08, 2014 at 07:16:17PM -0400, Zach Brown wrote:
The compression layer seems to have been built to return -1 and have
callers make up errors that make sense. This isn't great because there
are different classes
# /tmp/failod -x /mnt/btrfs/dir/80 | head -1
000
Signed-off-by: Zach Brown z...@redhat.com
---
fs/btrfs/inode.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 0c0bb45..fc89fa7
wrappers.
Signed-off-by: Zach Brown z...@redhat.com
---
fs/btrfs/compression.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index ed1ff1cb..7912695 100644
--- a/fs/btrfs/compression.c
+++ b/fs/btrfs/compression.c
@@ -888,7
real negative errnos from the compression layer so that
callers can pass on the error without having to guess what happened.
This helps a future path return errors from btrfs_decompress().
Signed-off-by: Zach Brown z...@redhat.com
---
fs/btrfs/lzo.c | 14 +++---
fs/btrfs/zlib.c | 26
+#ifdef CONFIG_BTRFS_FS_REF_VERIFY
+int btrfs_build_ref_tree(struct btrfs_fs_info *fs_info);
+void btrfs_free_ref_cache(struct btrfs_fs_info *fs_info);
+int btrfs_ref_tree_mod(struct btrfs_root *root, u64 bytenr, u64 num_bytes,
+u64 parent, u64 ref_root, u64 owner, u64
On Wed, Apr 02, 2014 at 09:24:10AM -0400, Chris Mason wrote:
On 04/02/2014 04:29 AM, Qu Wenruo wrote:
Convert the old btrfs man pages to new asciidoc and split the huge
btrfs man page into subcommand man page.
The asciidoc style and Makefile things are mostly simplified from git
There seems to be an issue if we try to build a btrfs based FS that
is less than 70M, we get the following assertion failure:
mkfs.btrfs: extent-tree.c:2682: btrfs_reserve_extent: Assertion
`!(ret)' failed.
mkfs.btrfs -b 104857600 -r rootfs rootfs.btrfs
Honestly, the path of least
. Thanks,
And this fixes it. It's run through a few times successfully.
cc: sta...@vger.kernel.org
Reported-by: Zach Brown z...@redhat.com
Signed-off-by: Josef Bacik jba...@fb.com
Tested-by: Zach Brown z...@redhat.com
- z
--
To unsubscribe from this list: send the line unsubscribe linux
+static int btrfs_ioctl_get_supported_features(struct file *file,
+ void __user *arg)
+{
+ struct btrfs_ioctl_feature_flags features[3];
+
+ features[0].compat_flags = BTRFS_FEATURE_COMPAT_SUPP;
+ features[0].compat_ro_flags =
Sorry for the latency. I was away last week.
On Fri, Oct 25, 2013 at 11:37:53AM -0400, Josef Bacik wrote:
Apparently we don't actually close the files until we return to userspace, so
stop using vfs_read in send. This is actually better for us since we can
avoid
all the extra logic of
This adds ioctl BTRFS_IOC_GET_FSIDS which reads the fs
info through the btrfs-control
Why not use sysfs?
+ sz_fslist_arg = sizeof(*fslist_arg);
+ fslist_arg = memdup_user(arg, sz_fslist_arg);
Doesn't check allocation failure.
+
+ sz_fslist = sizeof(*fslist) *
On Tue, Oct 22, 2013 at 06:22:49PM +0100, Al Viro wrote:
On Sun, Oct 20, 2013 at 11:33:56AM +0100, Phil Davis wrote:
The reason I think btrfs send is leaking open files is if you watch
/proc/sys/fs/file-nr you see the
number of open files increasing but if you kill the btrfs send
On Fri, Oct 18, 2013 at 10:11:15PM +0600, Roman Mamedov wrote:
On Fri, 18 Oct 2013 11:48:21 -0400
Josef Bacik jba...@fusionio.com wrote:
Whoever wrote this was braindead.
You do realize you sent a number of people googling for Delalloc is such a
pain. If we have a hole and we have
Don't just skip regression testing. Please.
You are mixing up my points. The first argument you're quoting is not against
regression testing in this case, and it deserves the stress answer, I agree.
Great, then we're done.
(Yes, I'm very much ignoring your other argument that's based on
Hi gang,
Here's some trivial cleanups that I've built up while reading through
the code. They've been run through xfstests -g quick.
- z
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at
for overlapping
page regions.
So remove move_pages() and just call copy_pages().
Signed-off-by: Zach Brown z...@redhat.com
---
fs/btrfs/extent_io.c | 19 +--
1 file changed, 1 insertion(+), 18 deletions(-)
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index c10291c..46a4022
Signed-off-by: Zach Brown z...@redhat.com
---
fs/btrfs/dev-replace.c | 16
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/fs/btrfs/dev-replace.c b/fs/btrfs/dev-replace.c
index 2a9bd5b..d3ee6e7 100644
--- a/fs/btrfs/dev-replace.c
+++ b/fs/btrfs/dev-replace.c
fs/btrfs/compat.h only contained trivial macro wrappers of drop_nlink()
and inc_nlink(). This doesn't belong in mainline.
Signed-off-by: Zach Brown z...@redhat.com
---
fs/btrfs/compat.h | 7 ---
fs/btrfs/compression.c | 1 -
fs/btrfs/dev-replace.c | 1 -
fs/btrfs/disk-io.c | 1
Probably a bit too obscure to turn this into an xfstest? At least nobody
complained so far, and this reproducer takes me 1m57 to run, so nothing I want
in each xfstest cycle.
I disagree. The entire point of regression tests is to trigger bugs
that the usual processes failed to find, like
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 646d10d..9837439 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -2041,6 +2041,7 @@ int btrfs_init_new_device(struct btrfs_root *root, char
*device_path)
device-in_fs_metadata = 1;
a filesystem is mounted. They set the device stats to zero by using
kzalloc() which is correct for new devices.
Oh, right, got it :)
- z
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at
to me.
Reviewed-by: Zach Brown z...@redhat.com
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
And close(fd) is already called 4 lines above. You didn't run the static
code analysis again after applying your patch :)
Nice, thanks for catching that. I certainly didn't run it again, no :).
- z
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a
didn't run the static
code analysis again after applying your patch :)
OK, here's a less dumb attempt:
- z
From f8a3425c184a55e0c254143e520e60a6856c27da Mon Sep 17 00:00:00 2001
From: Zach Brown z...@redhat.com
Date: Fri, 4 Oct 2013 15:38:18 -0700
Subject: [PATCH] btrfs-progs: check fopen failure
Compile-tested!
Cool, thanks!
[02/12] not merged, [08/12] replaces chandan's commit
I just sent another attempt at 02/ :).
- z
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at
On Tue, Oct 08, 2013 at 03:58:23PM -0600, Chris Murphy wrote:
I don't think this is expected, is it? I can no longer move a
subvolume into another subvolume. I can move a subvolume into a
directory. This happens with 3.11.3, and 3.12 rc4. I'm not sure yet
when the regression first appeared.
btrfs-corrupt-block added some untested path allocations. These showed
up in static analysis when they pass their path to btrfs_search_slot()
which unconditionally dereferences the path.
Signed-off-by: Zach Brown z...@redhat.com
---
btrfs-corrupt-block.c | 10 --
1 file changed, 8
Check for fopen() failure. This shows up in static analysis as a
possible null pointer derference.
Signed-off-by: Zach Brown z...@redhat.com
---
cmds-send.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/cmds-send.c b/cmds-send.c
index 374d040..5f6ff86 100644
--- a/cmds-send.c
+++ b
Hi friends,
Eric imported a newer git snapshot of btrfs-progs into Red Hat's
universe which kicked off a static analysis run which found a bunch
of problems. This series is my attempt to fix the warnings that I
agreed were either real bugs or messy code to clean up.
This is against Dave's
Don't carry around dead code. If its needed again, it's only a few git
commands away. This was found by static analysis.
Signed-off-by: Zach Brown z...@redhat.com
---
cmds-check.c | 50 --
1 file changed, 50 deletions(-)
diff --git a/cmds
This was found by static analysis.
Signed-off-by: Zach Brown z...@redhat.com
---
cmds-check.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/cmds-check.c b/cmds-check.c
index ebba58e..b6035d7 100644
--- a/cmds-check.c
+++ b/cmds-check.c
@@ -3228,13 +3228,13 @@ static
Presumably people missed these warnings because btrfs-fragments isn't
built by default.
Signed-off-by: Zach Brown z...@redhat.com
---
btrfs-fragments.c | 6 --
1 file changed, 6 deletions(-)
diff --git a/btrfs-fragments.c b/btrfs-fragments.c
index cedbc57..160429a 100644
--- a/btrfs
find_collision() allocates name_len bytes for its sub array so the index
must be less than name_len. This was found by static analysis.
Signed-off-by: Zach Brown z...@redhat.com
---
btrfs-image.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/btrfs-image.c b/btrfs
This was found by static analysis.
Signed-off-by: Zach Brown z...@redhat.com
---
btrfs-image.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/btrfs-image.c b/btrfs-image.c
index 03ad4e9..d10447f 100644
--- a/btrfs-image.c
+++ b/btrfs-image.c
@@ -1541,6 +1541,7 @@ next
Stop iteration at the number of elements in the colors[] array when
initializing the elements. Rather than a magic number. This was found
by static analysis.
Signed-off-by: Zach Brown z...@redhat.com
---
btrfs-fragments.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
commit 4782e8ebdb583dfa3615f7b38dee729d34f62ec1 accidentally replaced
[0] with [-1]. Put it back. This was found by static analysis.
Signed-off-by: Zach Brown z...@redhat.com
---
send-test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/send-test.c b/send-test.c
index
-by: Zach Brown z...@redhat.com
---
btrfs-convert.c | 23 ---
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/btrfs-convert.c b/btrfs-convert.c
index 221dd45..edef1bd 100644
--- a/btrfs-convert.c
+++ b/btrfs-convert.c
@@ -1428,10 +1428,15 @@ static struct btrfs_root
search_for_chunk_blocks() allocates a fixed-size buffer and then reads
arbitrary u32 sized buffers in to it. Instead let's fail if the item is
bigger than the buffer. This was found by static analysis.
Signed-off-by: Zach Brown z...@redhat.com
---
btrfs-image.c | 14 +++---
1 file
On Mon, Oct 07, 2013 at 09:20:44PM +0100, Filipe David Borba Manana wrote:
The btrfs_insert_empty_item() function doesn't modify its
key argument.
Looks reasonable to me.
Reviewed-by: Zach Brown z...@redhat.com
- z
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs
On Mon, Oct 07, 2013 at 04:45:01PM -0500, Eric Sandeen wrote:
On 10/7/13 4:43 PM, Zach Brown wrote:
commit 4782e8ebdb583dfa3615f7b38dee729d34f62ec1 accidentally replaced
[0] with [-1]. Put it back. This was found by static analysis.
Signed-off-by: Zach Brown z...@redhat.com
On Fri, Oct 04, 2013 at 02:55:29PM -0500, Chandra Seetharaman wrote:
alloc_extent_buffer() uses radix_tree_lookup() when radix_tree_insert() fails
with EEXIST. That part of the code is very similar to the code in
find_extent_buffer(). This patch replaces radix_tree_lookup() and surrounding
1 - 100 of 311 matches
Mail list logo