Displaying 20 results from an estimated 500 matches similar to: "[PATCH] Btrfs: simplify iteration codes"
2013 Jun 25
3
[PATCH] btrfs-progs: avoid memory leak in btrfs_close_devices
Three kind of structures need to be freed on close:
* All struct btrfs_device managed by fs_devices
* The name field for each struct btrfs_device
* The above items for seed_devices
Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com>
---
volumes.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/volumes.c b/volumes.c
index
2009 Nov 14
2
[PATCH] btrfs-progs: Check mount status of multidevice filesystems
Some programs like btrfsck should not be run on a mounted filesystem.
This patch adds a check in btrfs_open_devices() for the mount status
of every device belonging to the filesystem. The function check_mount()
gets improved support for loopback devices. It now detects if the
program is run on the file that is being used by the loopback device.
Signed-off-by: Andi Drebes
2013 Sep 01
0
[PATCH] btrfs: use list_for_each_entry_safe() when delete items
Replace list_for_each_entry() by list_for_each_entry_safe() in
__btrfs_close_devices()
list_for_each_entry() {
list_replace_rcu();
call_rcu(); <-- We may free the device, if we get next
device by the current one, the page fault
may happen.
}
Signed-off-by: Azat Khuzhin
2013 Oct 25
8
[PATCH] btrfs: add framework to read fs info from btrfs-control
This adds ioctl BTRFS_IOC_GET_FSIDS which reads the fs
info through the btrfs-control
Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
fs/btrfs/super.c | 47 ++++++++++++++++++++++++++++++++++++++-----
fs/btrfs/volumes.c | 33 ++++++++++++++++++++++++++++++
fs/btrfs/volumes.h | 2 +
include/uapi/linux/btrfs.h | 19 +++++++++++++++++
4 files changed,
2011 Apr 20
4
[PATCH 1/5] Btrfs: fix bh leak on __btrfs_open_devices path
''bh'' is forgot to release if no error is detected
Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
---
fs/btrfs/volumes.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 8b9fb8c..69fc902 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -631,6 +631,7 @@ static int
2011 Aug 26
0
[PATCH] Btrfs: make some functions return void
The type of some functions that return only 0 is changed to ''void''.
In addition, the check on the return value in the caller of these
functions becomes unnecessary. So, these check is removed.
Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
---
fs/btrfs/async-thread.c | 17 ++++--------
fs/btrfs/async-thread.h | 4 +-
fs/btrfs/compression.c | 14 ++++------
2008 Jun 10
1
[PATCH, RFC] btrfs: allow scanning multiple devices during mount
Allows to specify one or multiple device=/dev/foo options during mount
so that ioctls on the control device can be avoided. Especially useful
when trying to mount a multi-device setup as root.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: btrfs-unstable/super.c
===================================================================
--- btrfs-unstable.orig/super.c 2008-06-10
2013 Mar 18
0
[PATCH] Btrfs-progs: fix memory leaks on cleanup
I''ve been working on btrfs-image and I kept seeing these leaks pop up on
valgrind so I''m just fixing them. We don''t properly cleanup the device cache,
the chunk tree mapping cache, or the space infos on close. With this patch
valgrind doesn''t complain about any memory leaks running btrfs-image. Thanks,
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
2011 Apr 06
3
[PATCH V2] Btrfs: fix subvolume mount by name problem when default mount subvolume is set
We create two subvolumes (meego_root and meego_home) in
btrfs root directory. And set meego_root as default mount
subvolume. After we remount btrfs, meego_root is mounted
to top directory by default. Then when we try to mount
meego_home (subvol=meego_home) to a subdirectory, it failed.
The problem is when default mount subvolume is set to
meego_root, we search meego_home in meego_root but can not
2010 Dec 05
1
[PATCH 4/5][REPOST][BTRFS-PROGS] Avoid to scan cdrom and floppy
Hi all,
the commands "btrfs filesystem show" and "btrfs device scan" look at the /dev
directory (and it subdirectories) for every block devices.
This is a slow process because floppy and cdrom are also checked. Moreover,
as highlighted by Helmut, if udev is not used, the /dev directory is populated
by high number of non-existant devices, which slow the process.
My patch
2011 Oct 28
0
[PATCH] Btrfs: don't try to touch sb->s_bdev
Btrfs uses anon bdevs, this is not needed.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
---
fs/btrfs/volumes.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index f2a4cc7..afd6a1e 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -1376,8 +1376,6 @@ int btrfs_rm_device(struct btrfs_root *root, char
2011 Sep 13
5
[PATCH] btrfs: trivial fix, a potential memory leak in btrfs_parse_early_options()
Signed-off-by: Jie Liu <jeff.liu@oracle.com>
---
fs/btrfs/super.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 15634d4..16f31e1 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -406,7 +406,7 @@ static int btrfs_parse_early_options(const char
*options, fmode_t flags,
u64 *subvol_rootid, struct
2013 Mar 09
4
[PATCH] use rcu_barrier() to wait for bdev puts at unmount
Doing this would reliably fail with -EBUSY for me:
# mount /dev/sdb2 /mnt/scratch; umount /mnt/scratch; mkfs.btrfs -f /dev/sdb2
...
unable to open /dev/sdb2: Device or resource busy
because mkfs.btrfs tries to open the device O_EXCL, and somebody still has it.
Using systemtap to track bdev gets & puts shows a kworker thread doing a
blkdev put after mkfs attempts a get; this is left over
2009 Dec 21
0
[PATCH] btrfsctl: scan device and exit without using ioctl
''btrfsctl -A /path/to/device/file'' would only scan for a valid btrfs
on the device using volume recognition helpers.
---
btrfsctl.c | 42 ++++++++++++++++++++++++++++++++++++------
1 files changed, 36 insertions(+), 6 deletions(-)
diff --git a/btrfsctl.c b/btrfsctl.c
index 66c4e89..61020de 100644
--- a/btrfsctl.c
+++ b/btrfsctl.c
@@ -34,6 +34,8 @@
#include
2011 Dec 09
10
[PATCH 0/3] Btrfs: add IO error device stats
The goal is to detect when drives start to get an increased error rate,
when drives should be replaced soon. Therefore statistic counters are
added that count IO errors (read, write and flush). Additionally, the
software detected errors like checksum errors and corrupted blocks are
counted.
An ioctl interface is added to get the device statistic counters.
A second ioctl is added to atomically get
2009 Jan 19
1
[PATCH] Btrfs: check return value for kthread_run() correctly
kthread_run() returns the kthread or ERR_PTR(-ENOMEM), not NULL.
Signed-off-by: Qinghuang Feng <qhfeng.kernel@gmail.com>
---
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 81a3138..f718d25 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -1740,13 +1740,13 @@ struct btrfs_root *open_ctree(struct super_block *sb,
fs_info->system_alloc_profile =
2012 May 25
6
[PATCH v5 0/3] Btrfs: add IO error device stats
Changes v1-v2:
- Remove restriction that BTRFS_IOC_GET_DEVICE_STATS is a privileged
operation
- Cast u64 to unsigned long long for printf()
Changes v2-v3:
- Rebased on Chris'' current master
Changes v3-v4:
- Add padding at end of ioctl structure
Changes v4-v5:
- The statistic members in the ioctl are now organized as an array of
64 bit values. Symbolic names for the array indexes
2011 May 02
5
[PATCH v3 0/3] btrfs: quasi-round-robin for chunk allocation
In a multi device setup, the chunk allocator currently always allocates
chunks on the devices in the same order. This leads to a very uneven
distribution, especially with RAID1 or RAID10 and an uneven number of
devices.
This patch always sorts the devices before allocating, and allocates the
stripes on the devices with the most available space, as long as there
is enough space available. In a low
2011 Apr 12
3
[PATCH v2 0/3] btrfs: quasi-round-robin for chunk allocation
In a multi device setup, the chunk allocator currently always allocates
chunks on the devices in the same order. This leads to a very uneven
distribution, especially with RAID1 or RAID10 and an uneven number of
devices.
This patch always sorts the devices before allocating, and allocates the
stripes on the devices with the most available space, as long as there
is enough space available. In a low
2012 May 07
0
[PATCH V2] btrfs: fix message printing
Fix various messages to include newline and module prefix.
Signed-off-by: Daniel J Blueman <daniel@quora.org>
---
fs/btrfs/super.c | 8 ++++----
fs/btrfs/volumes.c | 6 +++---
fs/btrfs/zlib.c | 8 ++++----
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index c5f8fca..c0b8727 100644
--- a/fs/btrfs/super.c
+++