Free space items are located in tree of tree roots, not in the extent
tree. It didn't pop up because lookup_free_space_inode() grabs the
inode all the time instead of actually searching the tree.
Signed-off-by: Ilya Dryomov
---
fs/btrfs/extent-tree.c |2 +-
1 files changed, 1 inser
On Tue, Sep 27, 2011 at 03:02:41PM +0200, David Sterba wrote:
> On Tue, Aug 23, 2011 at 11:01:48PM +0300, Ilya Dryomov wrote:
> > This allows to have a separate set of filters for each chunk type
> > (data,meta,sys). The code however is generic and switch on chunk type
> &
On Mon, Sep 05, 2011 at 11:30:33AM +0100, Hugo Mills wrote:
> On Mon, Sep 05, 2011 at 12:13:25PM +0200, Björn Kalkbrenner wrote:
> > 2. why can't i do "mount -o subvolume=home /dev/mapper/root /home"
> > anymore? To be more exact, i can, but why is it empty and why is it
> > working when i enter th
On Sun, Sep 04, 2011 at 11:29:43AM -0400, Jérôme Poulin wrote:
> I recently converted a long-used ext4 filesystem after e2fsck to btrfs
> using btrfs-convert, everything went fine and all my files are there.
> I then decided to make the filesystem more managable so I made a
> snapshot of the root a
On Fri, Sep 02, 2011 at 05:33:57PM +0900, Tsutomu Itoh wrote:
> In current for-linus branch, I encountered the problem that the
> umount command doesn't end forever.
(snipped)
> umount acquires down_write(&s->s_umount) by deactivate_super() and
> waits for the end of btrfs-cleaner.
> But, btrfs-c
Signed-off-by: Ilya Dryomov
---
btrfs.c | 25 +++-
btrfs_cmds.c | 508 +-
btrfs_cmds.h |5 +
ctree.h |9 +
ioctl.h | 44 +
print-tree.c |3 +
volumes.h| 42 +
7 files changed, 632 insertions
pe resume
Any suggestions on the interface are welcome. Patch is on top of tmp
branch of cmason's repo, available at:
git://github.com/idryomov/btrfs-progs.git restriper-rfc
Thanks,
Ilya
Ilya Dryomov (1):
Btrfs-progs: add restriper commands
btrfs.c | 25 +++-
btrfs_
Signed-off-by: Ilya Dryomov
---
fs/btrfs/ioctl.c | 45 +
fs/btrfs/ioctl.h |2 ++
fs/btrfs/volumes.c | 40 ++--
fs/btrfs/volumes.h |3 +++
4 files changed, 84 insertions(+), 6 deletions(-)
diff --git
Remove btrfs_balance(). The old balancing ioctl now uses restriper
infrastructure, just w/o using any filters.
Signed-off-by: Ilya Dryomov
---
fs/btrfs/ioctl.c | 38 +-
fs/btrfs/volumes.c | 115 ---
fs/btrfs/volumes.h |1
Since restriper kthread starts involuntarily on mount and can suck cpu
and memory bandwidth add a mount option to forcefully skip it. The
restriper in that case hangs around in paused state and can be resumed
from userspace when it's convenient.
Signed-off-by: Ilya Dryomov
---
fs/btrfs/ct
Implement an ioctl for resuming restriper. We use the same heuristics
used when recovering restripe after a crash to try to start where we
left off last time. If needed those parameters can be made configurable
through the userspace "resume" command in future.
Signed-off-by: Il
llocations with the target profile.
Add a hook to close_ctree() to be able to pause restriper and free it's
data structures on unmount. (It's safe to unmount when restriper is in
'paused' state, we will resume with the same parameters on the next
mount)
Signed-off-by: Ilya Dr
Implement an ioctl for cancelling restriper. Currently we wait until
relocation of the current block group is finished, in future this can be
done by triggering a commit. Restripe item is deleted and no memory
about the interrupted restripe is kept.
Signed-off-by: Ilya Dryomov
---
fs/btrfs
usage filter and relocate only less-than-90%-full chunks of that type.
These are just heuristics but they help quite a bit, and can be improved
in future.
Signed-off-by: Ilya Dryomov
---
fs/btrfs/disk-io.c |3 +
fs/btrfs/ioctl.c |2 +-
fs/btrfs/volumes.c | 125
]
Older kernels simply ignore it so it's safe to mount with an older
kernel and then go back to the newer one.
Signed-off-by: Ilya Dryomov
---
fs/btrfs/ctree.h | 127 +++-
fs/btrfs/volumes.c | 105 +
Select chunks which have at least one byte located inside a given
[vstart, vend) virtual address space range.
Signed-off-by: Ilya Dryomov
---
fs/btrfs/volumes.c | 20
fs/btrfs/volumes.h |3 ++-
2 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/fs/btrfs
Select chunks which have at least one byte of at least one stripe
located on a device with devid X in a given [pstart,pend) physical
address range.
This filter only works when devid filter is turned on.
Signed-off-by: Ilya Dryomov
---
fs/btrfs/volumes.c | 45
Relocate chunks which have at least one stripe located on a device with
devid X.
Signed-off-by: Ilya Dryomov
---
fs/btrfs/volumes.c | 23 +++
fs/btrfs/volumes.h |1 +
2 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs
Select chunks that are less than X percent full.
Signed-off-by: Ilya Dryomov
---
fs/btrfs/volumes.c | 33 +
fs/btrfs/volumes.h |1 +
2 files changed, 34 insertions(+), 0 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index f045615
Select chunks based on a given profile mask.
Signed-off-by: Ilya Dryomov
---
fs/btrfs/volumes.c | 20
fs/btrfs/volumes.h |5 +
2 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index ff252ef..f045615 100644
nvert for example meta chunks the "hard" way while
converting data chunks selectively with soft switch.
Signed-off-by: Ilya Dryomov
---
fs/btrfs/volumes.c | 26 ++
fs/btrfs/volumes.h |5 -
2 files changed, 30 insertions(+), 1 deletions(-)
diff -
This allows to have a separate set of filters for each chunk type
(data,meta,sys). The code however is generic and switch on chunk type
is only done once.
This commit also adds a type filter: it allows to balance for example
meta and system chunks w/o touching data ones.
Signed-off-by: Ilya
olume operations when restriper is running.
(previously this restriction relied on volume_mutex being held during
the execution of any volume operation)
Signed-off-by: Ilya Dryomov
---
fs/btrfs/ctree.h |5 +
fs/btrfs/disk-io.c |4 +
fs/btrfs/ioctl.c | 107 ++
fs/
k
to plain reducing.
Signed-off-by: Ilya Dryomov
---
fs/btrfs/extent-tree.c | 54 +++-
1 files changed, 53 insertions(+), 1 deletions(-)
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c
index a04f99b..05e55d1 100644
--- a/fs/btrfs/extent-tree.
chunk of that type goes away. Restriper needs this to properly
operate when "downgrading".
Signed-off-by: Ilya Dryomov
---
fs/btrfs/extent-tree.c | 20
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tr
ge. However to avoid remappings
in future, reserve corresponding on-disk bit.
Signed-off-by: Ilya Dryomov
---
fs/btrfs/ctree.h | 12
fs/btrfs/extent-tree.c | 22 ++
2 files changed, 26 insertions(+), 8 deletions(-)
diff --git a/fs/btrfs/ctree.h b/fs/btrf
Chunk's type and profile are encoded in u64 flags field. Introduce
masks to easily access them.
Signed-off-by: Ilya Dryomov
---
fs/btrfs/ctree.h |8
fs/btrfs/extent-tree.c | 12 +++-
fs/btrfs/volumes.c | 11 ++-
3 files changed, 13 insertions(+
{data,metadata,system}_alloc_profile fields have been unused for a long
time now. Get rid of them.
Signed-off-by: Ilya Dryomov
---
fs/btrfs/ctree.h |3 ---
fs/btrfs/disk-io.c |3 ---
fs/btrfs/extent-tree.c | 10 --
fs/btrfs/volumes.c |6 ++
4 files
of
3.1-rc3, available at:
git://github.com/idryomov/btrfs-unstable.git restriper-rfc
Thanks,
Ilya
Ilya Dryomov (21):
Btrfs: get rid of *_alloc_profile fields
Btrfs: introduce masks for chunk type and profile
Btrfs: add BTRFS_AVAIL_ALLOC_BIT_SINGLE bit
Btrfs: make avail_*_all
On Tue, Jul 12, 2011 at 02:47:41AM +0200, krz...@gmail.com wrote:
> dd if=/dev/null of=img5 bs=1 seek=2G
> dd if=/dev/null of=img6 bs=1 seek=2G
> mkfs.btrfs -d raid1 -m raid1 img5 img6
> losetup /dev/loop4 img5
> losetup /dev/loop5 img6
> btrfs device scan
> mount -t btrfs /dev/loop4 dir
> umount
On Tue, Jun 28, 2011 at 08:26:43PM +0100, Hugo Mills wrote:
> On Tue, Jun 28, 2011 at 06:32:43PM +0200, David Sterba wrote:
> > On Sun, Jun 26, 2011 at 09:36:54PM +0100, Hugo Mills wrote:
> > > diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
> > > index 828aa34..fb11550 100644
> > > --- a/fs/b
data parameter should be u64 because a full-sized chunk flags field is
passed instead of 0/1 for distinguishing data from metadata. All
underlying functions expect u64.
Signed-off-by: Ilya Dryomov
---
fs/btrfs/extent-tree.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff
Hi Chris,
Can you pull this into the next -rc ? It's minor, but people think it's
useful. I just had another person asking about this patch.
Thanks,
Ilya
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.
error happens, for example, at
offset 512 or 1024 into the page. Also bi_flags field wasn't properly
setup before reusing the bio.
Signed-off-by: Ilya Dryomov
---
fs/btrfs/scrub.c | 48 +---
1 files changed, 13 insertions(+), 35 deletions(-)
diff
needed, instead pass [sbio pointer, index].
Originally this was added to look at the possibility of sharing the code
between drive swap and scrub, but it actually fixes a serious bug in
scrub code where errors that could be corrected were ignored and
reported as uncorrectable.
Signed-off-by: Ilya
On Thu, Mar 31, 2011 at 12:14:14PM -0500, Mitch Harder wrote:
> On Wed, Feb 9, 2011 at 8:05 AM, Ilya Dryomov wrote:
> > Get rid of FIXME comment. Uuids from dmesg are now the same as uuids
> > given by btrfs-progs.
> >
> > Signed-off-by: Ilya Dryomov
> > -
On Sat, Mar 19, 2011 at 12:02:03PM +0100, Andreas Philipp wrote:
> Hi all,
>
> During a btrfs filesystem balance there are lines like the following
> one in dmesg
> btrfs: relocating block group 2122280075264 flags 9
> Since the "big" number is strictly decreasing, I wonder whether this
> can be u
[CC'ing the list to make development public, the patch is againt Arne's
tree at kernel.org]
Hello Arne,
Below is a quite long diff the primary purpose of which is to make
fixups totally sync. They are already sync for checksum failures, this
patch makes them sync for EIO case as well. This is r
Sorry, that was too fast. Here is the right patch.
diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index ef59200..8926438 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -,7 +,7 @@ static noinline_for_stack int scrub_chunk(struct
scrub_dev *sdev,
struct map_lookup *map;
On Sat, Mar 12, 2011 at 03:50:42PM +0100, Arne Jansen wrote:
All extent maps are leaked after unmount. lookup_extent_mapping() takes
a reference, so they are all left with em->refs = 1. I suggest the
following:
> +static noinline_for_stack int scrub_chunk(struct scrub_dev *sdev,
> + u64 ch
On Tue, Mar 15, 2011 at 07:32:13AM +1100, Chris Samuel wrote:
> Hi Chris, et. al,
>
> I've recently come across cppcheck (static analyser for C code)
> and ran it on the current btrfs directory from Linus's repo and
> it's reported the following potential issues:
>
> linux-2.6$ cppcheck -q fs/btr
On Sat, Mar 12, 2011 at 03:50:42PM +0100, Arne Jansen wrote:
> This is the main scrub code.
>
> Updates v3:
>
> - fixed EIO handling, need to reallocate bio instead of reusing it
> - Updated according to David Sterba's review
> - don't clobber bi_flags on reuse, just set UPTODATE
> - allocate
On Sat, Feb 26, 2011 at 10:05:40AM +0800, Yan, Zheng wrote:
> On Sat, Feb 26, 2011 at 7:43 AM, Ilya Dryomov wrote:
> > In case of an ENOSPC error from btrfs_relocate_chunk() (line 2202) while
> > relocating a block group with offset 0 we end up endlessly looping.
> >
In case of an ENOSPC error from btrfs_relocate_chunk() (line 2202) while
relocating a block group with offset 0 we end up endlessly looping.
This happens because key.offset -= 1 statement then unconditionally
brings us back to the beginnig of the loop (key.offset == (u64)-1).
Signed-off-by: Ilya
btrfs_rm_device()
could lead to a situation where it was impossible to remove any of the
devices because of the "unable to remove the only writeable device"
error.
Signed-off-by: Ilya Dryomov
---
fs/btrfs/volumes.c | 11 +--
1 files changed, 9 insertions(+), 2 deletions(-)
t;mode.
Signed-off-by: Ilya Dryomov
---
fs/btrfs/volumes.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 2636a05..a228f63 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -1631,7 +1631,7 @@ int btrfs_init_new_device(
Get rid of FIXME comment. Uuids from dmesg are now the same as uuids
given by btrfs-progs.
Signed-off-by: Ilya Dryomov
---
fs/btrfs/volumes.c |8 ++--
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 2636a05..83b789c 100644
Memory allocated by calling kstrdup() should be freed.
Signed-off-by: Ilya Dryomov
---
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 d158530..9649cdd 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs
Minimizes the number of (sizeof(u32) * num_checksums) we have to do,
removes now useless first_page_offset variable.
Signed-off-by: Ilya Dryomov
---
fs/btrfs/free-space-cache.c | 12 ++--
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/fs/btrfs/free-space-cache.c b/fs
izeof(u32) * num_checksums) bytes
because disk_crcs should only hold checksums. gen is fetched
directly from the page.
cur_crc is initialized later in the code. Don't initialize it in a
declaration.
Signed-off-by: Ilya Dryomov
---
fs/btrfs/free-space-cache.c | 12
1 files
used
independently.
cur_crc is initialized later in the code. Don't initialize it in a
declaration.
Signed-off-by: Ilya Dryomov
---
fs/btrfs/free-space-cache.c | 12
1 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cac
strsep() modifies the string pointer, therefore freeing it instead of
original one results in a small memory leak. Fixes kmemleak warning.
Signed-off-by: Ilya Dryomov
---
fs/btrfs/super.c |6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/super.c b/fs/btrfs
201 - 252 of 252 matches
Mail list logo