When kthread_run() returns failure, this worker hasn't been
added to the list, so btrfs_stop_workers() won't free it.
Signed-off-by: Li Zefan [EMAIL PROTECTED]
---
async-thread.c |1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/async-thread.c b/async-thread.c
index
This patchset adds readonly-snapshots support. You can create a
readonly snapshot, and you can also set a snapshot (subvolume also)
readonly/writable on the fly.
A few readonly checks are added in setattr, permission, remove_xattr
and set_xattr callbacks, as well as in some ioctls.
The patchset
So we don't have to add new structures as we create more ioctls
for snapshots/subvolumes.
Now to create async snapshot, set BTRFS_SUBVOL_CREATE_SNAP_ASYNC bit
of vol_arg_v2-flags, and then call ioctl(BTRFS_IOCT_SNAP_CREATE_V2).
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/ioctl.c
Eliminate duplicate code in btrfs_read_fs_root_no_radix() and
find_and_setup_root().
Also prepare for the next patch.
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/disk-io.c | 31 +++
1 files changed, 15 insertions(+), 16 deletions(-)
diff --git a/fs
, btrfs_set/remove_xattr and some ioctls.
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/ctree.h |3 +++
fs/btrfs/disk-io.c |5 +
fs/btrfs/inode.c |8
fs/btrfs/ioctl.c | 40 +++-
fs/btrfs/ioctl.h
.
- Change the name from _SNAP_SETFLAGS to _SUBVOL_SETFLAGS.
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/ioctl.c | 92 ++
fs/btrfs/ioctl.h |4 ++
2 files changed, 96 insertions(+), 0 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs
...@newdream.net
Reviewed-by: Li Zefan l...@cn.fujitsu.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
.
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
I rebased the patch on Sage's fix, so you don't have to rebase it
by yourself.
---
fs/btrfs/ioctl.c | 44 +++-
fs/btrfs/ioctl.h | 14 +-
2 files changed, 36 insertions(+), 22 deletions(-)
diff
+#define BTRFS_ROOT_SNAP_RDONLY (1ULL 0)
+
struct btrfs_root_item {
struct btrfs_inode_item inode;
__le64 generation;
@@ -1116,6 +1118,7 @@ struct btrfs_root {
int defrag_running;
char *name;
int in_sysfs;
+bool readonly;
Does make sense to store
Goffredo Baroncelli wrote:
Hi Li,
On Thursday, 09 December, 2010, Li Zefan wrote:
This allows us to set a snapshot or a subvolume readonly or writable
on the fly.
Usage:
Set BTRFS_SUBVOL_RDONLY of btrfs_ioctl_vol_arg_v2-flags, and then
call ioctl(BTRFS_IOCTL_SUBVOL_SETFLAGS
01:25, Josef Bacik wrote:
Not being able to delete an orphan item isn't a horrible thing. The worst
that
happens is the next time around we try and do the orphan cleanup and we can't
find the referenced object and just delete the item and move on. Thanks,
Would be better to add code
After creating snapshot 10 from snapshot 9, snapshot 6 vanished from
the output of btrfs subvolume list /dev/sdf1:
# btrfs subv list /mnt/sdf1
ID 256 top level 5 path snap01
ID 257 top level 5 path snap02
ID 258 top level 5 path snap03
ID 259 top level 5
We check if num_found = sk-nr_items every time we find an
expected item, but num_found is not incremented, so we may
return items more than the user asked.
Also return -EINVAL if the user specified 0 nr_items.
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/ioctl.c |7 ---
1
- Check if the key is within specified range before checking the
item length.
- Advance to the next key a bit more efficiently.
- Remove redundant code.
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/ioctl.c | 30 --
1 files changed, 12 insertions(+), 18
Goffredo Baroncelli wrote:
Hi Li,
On Monday, 13 December, 2010, Li Zefan wrote:
The keys returned by tree search ioctl should be restricted to:
key.objectid = [min_objectid, max_objectid]
key.offset = [min_offset, max_offset]
key.type = [min_type, max_type
Goffredo Baroncelli wrote:
On Tuesday, 14 December, 2010, Li Zefan wrote:
Goffredo Baroncelli wrote:
Hi Li,
On Monday, 13 December, 2010, Li Zefan wrote:
The keys returned by tree search ioctl should be restricted to:
key.objectid = [min_objectid, max_objectid]
key.offset
Goffredo Baroncelli wrote:
On Wednesday, 15 December, 2010, Li Zefan wrote:
h4) objectid asis, type asis, offset++ - we should get the correct result.
This fix the problem of the missing subvolume. But for the other case
(searching for more than one type) the problem still here.
I don't
02:48, Goffredo Baroncelli wrote:
On Wednesday, 15 December, 2010, Li Zefan wrote:
Goffredo Baroncelli wrote:
On Wednesday, 15 December, 2010, Li Zefan wrote:
h4) objectid asis, type asis, offset++ - we should get the correct
result.
This fix the problem of the missing subvolume
This patchset adds readonly-snapshots support. You can create a
readonly snapshot, and you can also set a snapshot (subvolume also)
readonly/writable on the fly.
A few readonly checks are added in setattr, permission, remove_xattr
and set_xattr callbacks, as well as in some ioctls.
The patchset
Split it into two functions for two different ioctls, since they
share no common code.
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/ioctl.c | 84 +
1 files changed, 40 insertions(+), 44 deletions(-)
diff --git a/fs/btrfs/ioctl.c
.
Changelog for v3:
- Eliminate btrfs_root-readonly, but check btrfs_root-root_item.flags.
- Rename BTRFS_ROOT_SNAP_RDONLY to BTRFS_ROOT_SUBVOL_RDONLY.
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/ctree.h |7 +++
fs/btrfs/inode.c |8
fs/btrfs/ioctl.c
ioctl.
- Check if the passed fd is the root of a subvolume.
- Change the name from _SNAP_SETFLAGS to _SUBVOL_SETFLAGS.
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/ioctl.c | 83 ++
fs/btrfs/ioctl.h |2 +
2 files changed, 85
cwillu wrote:
On Wed, Nov 17, 2010 at 8:08 PM, Li Zefan l...@cn.fujitsu.com wrote:
Hi Chris,
Here's the updated patchset. As I still haven't got a kernel.org
account, I have set up a git tree in another public git repository,
and I'll use it for now.
You can pull from:
git
Kenneth Lakin wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
All,
I believe that I can pretty reliably reproduce the BUG mentioned in the
attached dmesg output. (This doesn't mean that you can, but I'll detail
what I've done here.) [This BUG is the same one that I reported last
Jeff Garzik wrote:
Tree as of commit 7bc4a4ce68f8c6d064ea949446852e996526f692 dies during btrfs
build on x86-64:
CC [M] fs/btrfs/ctree.o
In file included from fs/btrfs/ctree.c:21:0:
fs/btrfs/ctree.h:1003:17: error: field ‘super_kobj’ has incomplete type
fs/btrfs/ctree.h:1074:17:
07:01, Ian! D. Allen wrote:
Still getting btrfs subvolume list errors with this source:
git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs-unstable.git
Just because the fix hasn't been merged into the git tree..
I create ten snapshots, and after creating the tenth one, the
Chris Mason wrote:
Excerpts from Li Zefan's message of 2011-01-25 20:53:00 -0500:
(WARNING: this patch is not completed or well-tested)
We used to allocate inode number by searching through inode items, but
it made the allocation slower and slower as more and more files created.
The
...@redhat.com
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/free-space-cache.c |8 ++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index 60d6842..42f4015 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs
Remove some duplicated code.
This prepares for the next patch.
Reviewed-by: Josef Bacik jo...@redhat.com
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/free-space-cache.c | 37 -
1 files changed, 16 insertions(+), 21 deletions(-)
diff --git a/fs
If there's no more free space in a bitmap, we should free it.
Reviewed-by: Josef Bacik jo...@redhat.com
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/free-space-cache.c |2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs
trying to drop it into bitmap.
This also prepares for the next patch.
Reviewed-by: Josef Bacik jo...@redhat.com
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/free-space-cache.c | 75 --
1 files changed, 43 insertions(+), 32 deletions(-)
diff
fs_info, which is allocated in open_ctree(), should be freed
in close_ctree().
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/disk-io.c |2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index a5d2249..089871e 100644
From: Tero Roponen tero.ropo...@gmail.com
We must save and free the original kstrdup()'ed pointer
because strsep() modifies its first argument.
Signed-off-by: Tero Roponen tero.ropo...@gmail.com
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/super.c |5 +++--
1 files changed, 3
wrong.
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/ioctl.c |5 -
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index f87552a..1b61dab 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -1788,7 +1788,10 @@ static noinline
Dan Rosenberg wrote:
Commit 0caa102da82799efaba88e234484786a9591c797 introduced the
SUBVOL_SETFLAGS ioctl, which contains the following check:
if (flags ~BTRFS_SUBVOL_CREATE_ASYNC)
Oops, should be:
if (flags BTRFS_SUBVOL_CREATE_ASYNC)
return -EINVAL;
if
- Check user-specified flags correctly
- Check the inode owership
- Search root item in root tree but not fs tree
Reported-by: Dan Rosenberg drosenb...@vsecurity.com
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/ioctl.c |7 +--
1 files changed, 5 insertions(+), 2 deletions
case.
Reported-by: Juan Francisco Cantero Hurtado i...@juanfra.info
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/lzo.c | 21 ++---
1 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/fs/btrfs/lzo.c b/fs/btrfs/lzo.c
index cc9b450..a178f5e 100644
--- a/fs
Currently btrfs stores the highest objectid of the fs tree, and it always
returns (highest+1) inode number when we create a file, so inode numbers
won't be reclaimed when we delete files, so we'll run out of inode numbers
as we keep create/delete files in 32bit machines.
This patchset aims to fix
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/free-space-cache.c | 15 ---
fs/btrfs/free-space-cache.h |1 -
2 files changed, 0 insertions(+), 16 deletions(-)
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index a039065..4e27eaa 100644
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/free-space-cache.c | 20
1 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index 4e27eaa..bc60114 100644
--- a/fs/btrfs/free-space-cache.c
+++ b
-transaction case.
The rb-tree is a hybrid extent+bitmap tree, so if we have too many small
chunks of inode numbers, we'll use bitmaps. Initially we allow 16K ram
of extents, and a bitmap will be used if we exceed this threshold. The
extents threshold is adjusted in runtime.
Signed-off-by: Li Zefan l
Extract out block group specific code from lookup_free_space_inode(),
create_free_space_inode(), load_free_space_cache() and
btrfs_write_out_cache(), so the code can be used to read/write
free ino cache.
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/free-space-cache.c | 317
.
To keep compatibility, we check the root generation against the generation
of the special inode when loading the cache, so the loading will fail
if the btrfs filesystem was mounted in an older kernel before.
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/ctree.h|7 +++
fs
Arne Jansen wrote:
scrub_chunk failed to free all extent_maps it referenced, leading to a leak
of these maps on unmount.
Reported-by: Ilya Dryomov idryo...@gmail.com
Signed-off-by: Arne Jansen sensi...@gmx.net
I think it's better to fold those fix-up patches into your original scrub
04:18, Josef Bacik wrote:
We have been creating bitmaps for small extents unconditionally forever. This
was great when testing to make sure the bitmap stuff was working, but is
overkill normally. So instead of always adding small chunks of free space to
bitmaps, only start doing it if we go
Josef Bacik wrote:
The free space cluster stuff is heavy duty, so there is no sense in going
through the entire song and dance if there isn't enough space in the block
group
to begin with. Thanks,
Signed-off-by: Josef Bacik jo...@redhat.com
Reviewed-by: Li Zefan l...@cn.fujitsu.com
Hi all,
When I am creating subvolumes I get this strange behavior. If I create
a subvolume with a name longer than 4 characters it is read-only, if
the name is shorter than 5 characters the subvolume is writeable as
expected. I think it is since I upgraded to kernel version 2.6.38 (I
do
When I am creating subvolumes I get this strange behavior. If
I create a subvolume with a name longer than 4 characters it
is read-only, if the name is shorter than 5 characters the
subvolume is writeable as expected. I think it is since I
upgraded to kernel version 2.6.38 (I do not create
IMHO, this is related to how the debug options of the kernel are
configured. Attached you find two config files, both for kernel
version 2.6.38, with the one named 2.6.38-debug everything works and
with the other one newly created subvolumes are read only.
I've figured out what's wrong.
-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/ctree.h |4
fs/btrfs/disk-io.c |4 +++-
fs/btrfs/ioctl.c |4
fs/btrfs/root-tree.c | 18 ++
fs/btrfs/transaction.c |1 +
5 files changed, 30 insertions(+), 1 deletions(-)
diff --git a/fs
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/inode.c | 17 -
1 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index db67821..fa9fd5e 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -108,6 +108,7 @@ static int
David Sterba wrote:
Hi,
Chris, you did not add my sign-of on the unaligned fix I've posted, nor
the tested-by or reported-by. Looking again into the mail, it seems like
some automated-misprocessing picked the first part of the mail altough
there was properly formated patch after '--' marker
+ spin_lock(block_group-tree_lock);
+ if (btrfs_block_group_free_space(block_group) !=
This function call can be replaced by block_group-free_space, so
we don't have to iterate the tree.
(This function gets removed in my patchset for inode number caching)
+
liubo wrote:
On 04/04/2011 05:31 PM, Konstantinos Skarlatos wrote:
Hello,
I would like to ask about the status of this feature/patch, is it
accepted into btrfs code, and how can I use it?
Yes, it is now in the latest 2.6.39-rc1.
I am interested in enabling compression in a specific
krz...@gmail.com wrote:
When I've used btrfs subvolume, without separately mouting it, for
mysql database dir I've got
Fatal error: Can't open and lock privilege tables: Table 'host' is read only
when starting mysql. When I've put mysql database dir in root of
btrfs, not a subvolume, mysql
13:27, Zhong, Xin wrote:
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
01:06, Hugo Mills wrote:
This patch introduces a basic form of progress monitoring for balance
operations, by counting the number of block groups remaining. The
information is exposed to userspace by an ioctl.
Signed-off-by: Hugo Mills h...@carfax.org.uk
---
fs/btrfs/ctree.h |9
Yoshinori Sano wrote:
This patch fixes memory leaks in btrfs_new_inode().
Signed-off-by: Yoshinori Sano yoshinori.s...@gmail.com
---
fs/btrfs/inode.c |5 -
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index aa116dc..d8c93c1
Hi Chris,
Those bugs are small, and the fixes are simple and straitforward.
You can pull from:
git://repo.or.cz/linux-btrfs-devel.git for-chris
Li Zefan (2):
Btrfs: Check if btrfs_next_leaf() returns error in btrfs_listxattr()
Btrfs: Check if btrfs_next_leaf() returns
btrfs_next_leaf() can return -errno, and we should propagate
it to userspace.
This also simplifies how we walk the btree path.
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/xattr.c | 33 -
1 files changed, 12 insertions(+), 21 deletions(-)
diff
btrfs_next_leaf() can return -errno, and we should propagate
it to userspace.
This also simplifies how we walk the btree path.
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/inode.c | 28 ++--
1 files changed, 10 insertions(+), 18 deletions(-)
diff --git
From: Miao Xie mi...@cn.fujitsu.com
Link count of the inode is not decreased if btrfs_set_inode_index()
fails.
Signed-off-by: Miao Xie mi...@cn.fujitsu.com
Singed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/inode.c |6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff
, a newly created file will be set with
the FS_NOCOW_FL flag. So to turn on COW for it, we can just clear the
FS_NOCOW_FL flag.
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/ioctl.c | 15 ++-
include/linux/fs.h |1 -
2 files changed, 6 insertions(+), 10 deletions(-)
diff
Steps to reproduce the bug:
- Call FS_IOC_SETLFAGS ioctl with flags=FS_COMPR_FL
- Call FS_IOC_SETFLAGS ioctl with flags=0
- Call FS_IOC_GETFLAGS ioctl, and you'll see FS_COMPR_FL is still set!
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/ioctl.c |2 ++
1 files changed, 2
As we've added per file compression/cow support.
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/ioctl.c |7 +++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 3240dd9..aeabf6b 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs
Since commit dc89e9824464e91fa0b06267864ceabe3186fd8b, we've changed
to use a specific slab for alocation of free_space items.
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/free-space-cache.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/btrfs/free-space
us from panicing when we check to make sure
we
don't have too many bitmaps. Thanks,
Signed-off-by: Josef Bacik jo...@redhat.com
Reviewed-by: Li Zefan l...@cn.fujitsu.com
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord
Chris Mason wrote:
Excerpts from liubo's message of 2011-04-21 03:58:21 -0400:
The current code relogs the entire inode every time during fsync log,
and it is much better suited to small files rather than large ones.
During my performance test, the fsync performace of large files sucks,
and
Currently btrfs stores the highest objectid of the fs tree, and it always
returns (highest+1) inode number when we create a file, so inode numbers
won't be reclaimed when we delete files, so we'll run out of inode numbers
as we keep create/delete files in 32bits machines.
This patchset aims to
We've already recorded the value in block_group-frees_space.
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/free-space-cache.c | 15 ---
fs/btrfs/free-space-cache.h |1 -
2 files changed, 0 insertions(+), 16 deletions(-)
diff --git a/fs/btrfs/free-space-cache.c b/fs
No functional change.
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/free-space-cache.c | 20
1 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index 3af64c6..0e23bba 100644
--- a/fs/btrfs
btrfs_free_space_op
We do block group specific work (e.g. calculation of extents threshold)
through functions registered in this struct.
And then we can remove references to struct btrfs_block_group_cache.
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/ctree.h|7 +-
fs
-transaction case.
The rb-tree is a hybrid extent+bitmap tree, so if we have too many small
chunks of inode numbers, we'll use bitmaps. Initially we allow 16K ram
of extents, and a bitmap will be used if we exceed this threshold. The
extents threshold is adjusted in runtime.
Signed-off-by: Li Zefan l
Extract out block group specific code from lookup_free_space_inode(),
create_free_space_inode(), load_free_space_cache() and
btrfs_write_out_cache(), so the code can be used to read/write
free ino cache.
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/free-space-cache.c | 358
)-location.objectid !=
inode-i_ino: the btree inode (0 vs 1) and empty subvol dirs (256 vs 2),
and inode-i_ino will be used in those cases.
Another reason to make this change is I'm going to use a special inode
to save free ino cache, and the inode number must be (u64)-256.
Signed-off-by: Li Zefan l
.
To keep compatibility, we check the root generation against the generation
of the special inode when loading the cache, so the loading will fail
if the btrfs filesystem was mounted in an older kernel before.
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/ctree.h|7 +++
fs
Li Zefan wrote:
Currently btrfs stores the highest objectid of the fs tree, and it always
returns (highest+1) inode number when we create a file, so inode numbers
won't be reclaimed when we delete files, so we'll run out of inode numbers
as we keep create/delete files in 32bits machines
Andreas Philipp wrote:
There is kernel side support for the creation of read-only snapshots
for some time now, but I did not find any patches for the userspace
btrfs utilites. Thus I created this patchset which is tested and
working with kernel version 2.6.39-rc2.
Andreas Philipp (5):
Andreas Philipp wrote:
Use BTRFS_IOC_CREATE_SNAP_V2 instead of BTRFS_IOC_CREATE_SNAP and add
an option for the creation of a readonly snapshot.
Signed-off-by: Andreas Philipp philipp.andr...@gmail.com
---
btrfs_cmds.c | 44
1 files changed,
+ while(1) {
+ int c = getopt(argc, argv, r);
+ if (c 0)
+ break;
+ switch(c) {
+ case 'r':
+ optind++;
+ readonly = 1;
+
+subvol = argv[optind+1];
+dst = argv[optind+2];
+struct btrfs_ioctl_vol_args_v2 args;
Does the standard C allow to define a variable in the middle in a
function instead of in the begin ?
Anyway, even not required, I suggest to fill args by zero.
+ memset(args, 0,
Any comments? If this patch is acceptable, it should be queued for .39?
since fs.h is exported to userspace.
Li Zefan wrote:
FS_COW_FL and FS_NOCOW_FL were newly introduced to control per file
COW in btrfs, but FS_NOCOW_FL is sufficient.
The fact is we don't have corresponding
Chris Mason wrote:
Hi everyone,
I've pushed out my current kernel git tree to a new branch called
integration-test. This is meant for integration testing only and should
not be run by anyone who doesn't love crashes.
I've pulled together a lot of important work from a lot of different
Steven Rostedt wrote:
On Wed, 2011-05-25 at 09:12 -0700, Randy Dunlap wrote:
But what I sent out previously is not going into 2.6.40 anyway. Ingo
feels that it's too late in the merge window to pull those changes and
wants to wait till the next merge window. Since there's some fixes in
to search through the extent tree.
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
based on the integration-test branch
---
fs/btrfs/inode-map.c | 28 ++--
1 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/fs/btrfs/inode-map.c b/fs/btrfs/inode-map.c
index
As the lzo compression feature has been established for quite
a while, we are now ready to replace zlib with lzo as the default
compression scheme.
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/disk-io.c |2 +-
fs/btrfs/ioctl.c |2 +-
fs/btrfs/super.c |8
3
to search through the extent tree.
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
based on the integration-test branch.
v2: fixed an off-by-one bug
---
fs/btrfs/inode-map.c | 28 ++--
1 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/fs/btrfs/inode-map.c b/fs
I bisected using kernel version 2.6.39 + latest for-linus branch.
Bisect complains about this commit:
581bb050941b4f220f84d3e5ed6dace3d42dd382 is the first bad commit
commit 581bb050941b4f220f84d3e5ed6dace3d42dd382
Author: Li Zefan l...@cn.fujitsu.com
Date: Wed Apr 20 10:06:11 2011 +0800
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/inode.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 02ff4a1..4e9aa28 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -3646,7 +3646,7 @@ void btrfs_evict_inode(struct
The size of struct btrfs_ioctl_fs_info_args is as big as 1KB, so
don't declare the variable on stack.
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
fs/btrfs/ioctl.c | 23 ++-
1 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs
-if (copy_to_user(arg, fi_args, sizeof(fi_args)))
-return -EFAULT;
+if (copy_to_user(arg, fi_args, sizeof(fi_args)))
sizeof(*fi_args)
will integrate that, thanks :)
Oops, what a silly mistake!
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs
The size of struct btrfs_ioctl_fs_info_args is as big as 1KB, so
don't declare the variable on stack.
Signed-off-by: Li Zefan l...@cn.fujitsu.com
---
v2: fixed to pass the right size to copy_to_user().
---
fs/btrfs/ioctl.c | 23 ++-
1 files changed, 14 insertions(+), 9
Josef Bacik wrote:
We used to store the checksums of the space cache directly in the space cache,
however that doesn't work out too well if we have more space than we can fit
the
checksums into the first page. So instead use the normal checksumming
infrastructure. There were problems with
Chris Mason wrote:
Excerpts from Li Zefan's message of 2011-06-12 21:52:32 -0400:
Josef Bacik wrote:
We used to store the checksums of the space cache directly in the space
cache,
however that doesn't work out too well if we have more space than we can
fit the
checksums into the first
09:02, Andi Kleen wrote:
Chris Mason chris.ma...@oracle.com writes:
Hi everyone,
The for-linus branch of the btrfs unstable tree:
git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git
for-linus
Has our current queue of fixes. Josef's is the biggest pile, mostly in
Li Zefan wrote:
Chris Mason wrote:
Excerpts from Li Zefan's message of 2011-06-12 21:52:32 -0400:
Josef Bacik wrote:
We used to store the checksums of the space cache directly in the space
cache,
however that doesn't work out too well if we have more space than we can
fit the
checksums
Chris Mason wrote:
Excerpts from Li Zefan's message of 2011-06-12 21:52:32 -0400:
Josef Bacik wrote:
We used to store the checksums of the space cache directly in the space
cache,
however that doesn't work out too well if we have more space than we can
fit the
checksums into the first
Cc: Josef
I encountered following panic using 'btrfs-unstable + for-linus'
kernel.
I ran btrfs fi bal /test5 command, and mount option of /test5
is as follows:
/dev/sdc3 on /test5 type btrfs
(rw,space_cache,compress=lzo,inode_cache)
So, just a btrfs fi bal would lead to the bug?
I
!
On Mon, Jun 13, 2011 at 3:13 PM, Li Zefan l...@cn.fujitsu.com wrote:
Cc: Josef
I encountered following panic using 'btrfs-unstable + for-linus'
kernel.
I ran btrfs fi bal /test5 command, and mount option of /test5
is as follows:
/dev/sdc3 on /test5 type btrfs
(rw,space_cache,compress=lzo
Andreas Philipp wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 13.06.2011 13:50, David Sterba wrote:
On Sat, Jun 11, 2011 at 05:39:15PM +0200, Andreas Philipp wrote:
On one of my btrfs volumes I see a strange output from filefrag when
run against a particular large (~8GB) file.
1 - 100 of 299 matches
Mail list logo