On 2012/12/7 23:42, Wang Sheng-Hui wrote:
> We should make sure fs_info is not null before we refer to its field.
> Add simple check here.
Why? Is there any caller passing NULL @fs_info to this function?
>
> Signed-off-by: Wang Sheng-Hui
> ---
> fs/btrfs/super.c |2 +-
> 1 file changed, 1
On 2012/10/24 16:15, Lukáš Czerner wrote:
> On Tue, 16 Oct 2012, Lukas Czerner wrote:
>
>> Date: Tue, 16 Oct 2012 11:34:36 +0200
>> From: Lukas Czerner
>> To: linux-btrfs@vger.kernel.org
>> Cc: jba...@fusionio.com, Lukas Czerner
>> Subject: [PATCH] btrfs: Return EINVAL when length to trim is les
> may i ask a stupid question, if i remove my "compress-force=lzo" option, will
> compression disabled for new written data?
the answer is yes. :)
--
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 a
On 2012/9/2 13:25, David Sterba wrote:
> On Fri, Aug 31, 2012 at 04:40:36PM +0200, Ben Wreder wrote:
>> The disk format description implies that btrfs should be able to
>> support tail packing. I just did some experimentation, and while small
>> files are packed, it seems that files occupying more
> diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
> index a0ee2f8..3a1a700 100644
> --- a/fs/btrfs/ctree.h
> +++ b/fs/btrfs/ctree.h
> @@ -3103,6 +3103,19 @@ void __btrfs_abort_transaction(struct
> btrfs_trans_handle *trans,
> struct btrfs_root *root, const char *func
On 2012/7/11 3:29, Josef Bacik wrote:
> On Mon, Jul 09, 2012 at 08:21:07PM -0600, Li Zefan wrote:
>> Inodes always allocate free space with BTRFS_BLOCK_GROUP_DATA type,
>> which means every inode has the same BTRFS_I(inode)->free_space pointer.
>>
>> This shrinks str
The otime field is not zeroed, so users will see random otime in an old
filesystem with a new kernel which has otime support in the future.
The reserved bytes are also not zeroed, and we'll have compatibility
issue if we make use of those bytes.
Signed-off-by: Li Zefan
---
fs/btrfs/de
On 2012/7/5 9:52, Alexander Block wrote:
> On Thu, Jul 5, 2012 at 3:07 AM, Li Zefan wrote:
>> On 2012/7/4 19:04, Alexander Block wrote:
>>
>>> On Wed, Jul 4, 2012 at 9:56 AM, Li Zefan wrote:
>>>> On 2012/7/4 15:18, chandan r wrote:
>>>>
&
in redunction of ~37K bytes.
textdata bss dec hex filename
629661 12489 216 642366 9cd3e fs/btrfs/btrfs.o.orig
592637 12489 216 605342 93c9e fs/btrfs/btrfs.o
Signed-off-by: Li Zefan
---
fs/btrfs/ctree.h| 53 +++--
fs/btrfs/struct-funcs.c
Inodes always allocate free space with BTRFS_BLOCK_GROUP_DATA type,
which means every inode has the same BTRFS_I(inode)->free_space pointer.
This shrinks struct btrfs_inode by 4 bytes (or 8 bytes on 64 bits).
Signed-off-by: Li Zefan
---
fs/btrfs/btrfs_inode.h |3 ---
fs/btrfs/ctre
On 2012/7/4 19:04, Alexander Block wrote:
> On Wed, Jul 4, 2012 at 9:56 AM, Li Zefan wrote:
>> On 2012/7/4 15:18, chandan r wrote:
>>
>>> This patch adds a new member to the 'struct btrfs_inode' structure to hold
>>> the file creation time.
>>>
On 2012/7/4 15:18, chandan r wrote:
> This patch adds a new member to the 'struct btrfs_inode' structure to hold
> the file creation time.
>
Well, how do users use this file creation time? There's no syscall and there's
no ioctl that exports this information. That xstat syscall hasn't been acce
It's a bug, but it happens to work, as BTRFS_COMPRESS_LZO == 2, which
has only one bit set.
Signed-off-by: Li Zefan
---
fs/btrfs/disk-io.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 7ae51de..fe82070 100644
--- a/fs/
heck to decide if we should defrag the range")
The cause is, that commit looked into previous and next extents using
lookup_extent_mapping() only.
While at it, remove the code that checks the previous extent, since
it's sufficient to check the next extent.
Signed-off-by: Li Zefan
On 2012/5/29 2:37, Bruce Guenter wrote:
>
> Is there any way to mark existing snapshots as read-only? Making new
> ones read-only is easy enough, but what about existing ones?
>
We have code in the kernel side, so what we need to do is to update btrfs-progs,
which is trivial.
--
To unsubscribe
(Note: I've changed my email address ;)
David Sterba wrote:
> On Mon, Mar 12, 2012 at 04:39:28PM +0800, Li Zefan wrote:
>> Currently it returns a set of bits that were cleared, but this return
>> value is not used at all.
>>
>> Moreover it doesn't seem to be
he passing extent_state, so clear_extent_bit() may end up
referencing freed memory.
Signed-off-by: Li Zefan
---
no more Chinese characters in this section. ;)
---
fs/btrfs/extent_io.c | 36 +---
1 files changed, 21 insertions(+), 15 deletions(-)
diff --git a/fs/btrfs/e
he passing extent_state, so clear_extent_bit() may end up
referencing freed memory.
Signed-off-by: Li Zefan
---
经过测试,发现clear_state_bit()会在80%的情况下直接把state free掉。所以之前
的比较简单的patch,会在80%的情况下重新goto回去搜索rbtree,会很慢。所以,现在
改成由clear_state_bit()返回下一个state。
---
fs/btrfs/extent_i
Currently it returns a set of bits that were cleared, but this return
value is not used at all.
Moreover it doesn't seem to be useful, because we may clear the bits
of a few extent_states, but only the cleared bits of last one is
returned.
Signed-off-by: Li Zefan
---
fs/btrfs/extent
- We might unlock head->mutex while it was not locked
- We might leave the function without unlocking delayed_refs->lock
Signed-off-by: Li Zefan
---
fs/btrfs/backref.c |8 ++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/backref.c b/fs/btrfs/backref.c
David Sterba wrote:
> Hi,
>
> thanks for the patch!
>
> On Tue, Feb 21, 2012 at 05:04:28PM +0800, Li Zefan wrote:
>> Follow those instructions, and you'll trigger a warning in the
>> beginning of d_set_d_op():
>>
>> # mkfs.btrfs /dev/loop3
>>
lloc() set d_op to sb->s_d_op (btrfs_dentry_operations), and
then simple_lookup() reset it to simple_dentry_operations, which
triggered the warning.
Signed-off-by: Li Zefan
---
fs/btrfs/inode.c | 14 +-
1 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/inode
Mitch Harder wrote:
> I've been trying to test the snappy compression patches, but I'm
> getting corruptions when trying to use snappy as built on my system.
>
> I'm checking out the Linux 3.2.6 kernel, merging that with the latest
> 'for-linus' branch on Chris Mason's kernel.org repo, and then
>
Yan, Zheng wrote:
> On Thu, Jan 27, 2011 at 4:46 PM, Li Zefan wrote:
>> Suppose:
>> - the source extent is: [0, 100]
>> - the src offset is 10
>> - the clone length is 90
>> - the dest offset is 0
>>
>> This statement:
>>
>>new_k
Jan Schmidt wrote:
> On 30.01.2012 07:33, Li Zefan wrote:
>> Jan Schmidt wrote:
>>> I was looking at the clone range ioctl and have some remarks:
>>>
>>> On 27.01.2011 09:46, Li Zefan wrote:
>>>> diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
>> It's safe and easy to do so, provided the ranges don't overlap.
>>
>> Signed-off-by: Li Zefan
>> ---
>> fs/btrfs/ioctl.c | 23 ---
>> 1 files changed, 16 insertions(+), 7 deletions(-)
>>
>> diff --git a/fs/btrfs/i
It's safe and easy to do so, provided the ranges don't overlap.
Signed-off-by: Li Zefan
---
fs/btrfs/ioctl.c | 23 ---
1 files changed, 16 insertions(+), 7 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 0b06a5c..8fcd671 100644
--- a/fs/btr
> Is there a way to set options like compression on a btrfs permanently to
> activate them even when mounted automatically by the desktop or manually
> by a third person?
Actually there is.
Btrfs supports per file compression flag, and if this flag is set to a
directory, all files in that directo
Jan Schmidt wrote:
> I was looking at the clone range ioctl and have some remarks:
>
> On 27.01.2011 09:46, Li Zefan wrote:
>> 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
>> I currently don't see how to repair this afterwards without removing the
>> uncompressed files and writing new ones, which on the other hand spoils
>> hte memory saving effect of using snapshots instead of copies.
>
> A rebalance is the usual way of handling such things, since that rewrites
>
Goffredo Baroncelli wrote:
> On Thursday, 26 January, 2012 16:41:32 Duncan wrote:
>> 1) My /boot partition and its backup (which I do want to keep separate
>> from root) are only 128 MB each. The wiki recommends 1 gig sizes
>> minimum, but there's some indication that's dated info due to mixed d
Andi Kleen wrote:
>> It's because decompressing inline extents always fails. I've fixed it
>> and will send the patch out in a new mail thread.
>
> Thanks for fixing.
>
>>
>> But seems there's bug in lib snappy code, which makes the decompressed
>> data doesn't quite match the original data.
>>
>
The first four bytes is the length of all data chunks, and the first
four bytes of each chunk is the length of compressed chunk data,
even when there's only one chunk, which is the case for inline
extents.
Signed-off-by: Li Zefan
---
fs/btrfs/snappy.c |4
1 files changed, 4 inser
Andi Kleen wrote:
>> It's because decompressing inline extents always fails. I've fixed it
>> and will send the patch out in a new mail thread.
>
> Thanks for fixing.
>
>>
>> But seems there's bug in lib snappy code, which makes the decompressed
>> data doesn't quite match the original data.
>>
>
21:54, Chris Mason wrote:
> On Thu, Jan 12, 2012 at 04:28:47PM -0800, Andi Kleen wrote:
>> Here's a slightly updated version of the BTRFS snappy interface.
>> snappy is a faster compression algorithm that provides similar
>> compression as LZO, but generally better performance.
>
> Thanks Andi, I'
g was set, though we didn't mount with
snappy enabled.
Signed-off-by: Li Zefan
---
This patch is for the snappy branch.
---
fs/btrfs/disk-io.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 5924163..27101e4 10064
d-off-by: Liu Bo
Reviewed-by: Li Zefan
> ---
> fs/btrfs/ioctl.c |2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
--
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
We can recover from errors and return -errno to user space.
Signed-off-by: Li Zefan
---
fs/btrfs/ioctl.c | 18 ++
1 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index c04f02c..9619fb0 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs
We pre-allocate a btrfs bio with fixed size, and then may re-allocate
memory if we find stripes are bigger than the fixed size. But this
pre-allocation is not necessary.
Also we don't have to calcuate the stripe number twice.
Signed-off-by: Li Zefan
---
fs/btrfs/volumes.c |
than the start of the
block group.
Signed-off-by: Li Zefan
---
fs/btrfs/free-space-cache.c | 41 -
1 files changed, 20 insertions(+), 21 deletions(-)
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index ec23d43..01840ef 100644
---
Some functions never use the transaction handle passed to them.
Signed-off-by: Li Zefan
---
fs/btrfs/extent-tree.c |2 +-
fs/btrfs/volumes.c | 18 +++---
fs/btrfs/volumes.h |3 +--
3 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/fs/btrfs/extent
If we run into some failure path in io_ctl_prepare_pages(),
io_ctl->pages[] array may have some NULL pointers.
Signed-off-by: Li Zefan
---
fs/btrfs/free-space-cache.c |8 +---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/f
ll confict with Al Viro's vfs changes.
Li Zefan (11):
Btrfs: add pinned extents to on-disk free space cache correctly
Btrfs: avoid possible NULL deref in io_ctl_drop_pages()
Btrfs: check the return value of io_ctl_init()
Btrfs: remove BUG_ON()s in btrfs_ioctl_setflag
It can return -ENOMEM.
Signed-off-by: Li Zefan
---
fs/btrfs/free-space-cache.c |9 +++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index 4e55af3..e4eb222 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs
Check and reserve space for btrfs_update_inode().
Signed-off-by: Li Zefan
---
fs/btrfs/ioctl.c |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 9619fb0..fe8a60c 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -254,7
evices();
lock(uuid_mutex);
and then we hit a lockdep splat.
Signed-off-by: Li Zefan
---
fs/btrfs/disk-io.c |2 --
fs/btrfs/volumes.c |9 +++--
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 3f9d555..858ab34
space in the filesystem.
Afterwards we add a sprout device to it, and the kernel creates a METADATA
block group and a SYSTEM block group where comes free space we can reserve,
but we still get revervation failure because the global block_rsv hasn't
been updated accordingly.
Signed-off-by
/mnt
Data: total=3.58GB, used=1.79GB
System, DUP: total=8.00MB, used=4.00KB
System: total=4.00MB, used=0.00
Metadata, DUP: total=205.12MB, used=97.14MB
Metadata: total=8.00MB, used=0.00
Signed-off-by: Li Zefan
---
fs/btrfs/free-space-cache.c | 235
dev2 dev3(raid0)
---
s0 s3 s6 s1 s4 s7 s2 s5
Each device has (total_stripes / nr_dev) stripes, or plus one.
Signed-off-by: Li Zefan
---
fs/btrfs/volumes.c | 95 +--
David Sterba wrote:
> I mounted a multi-folume fs created not-so-long ago in a 3.1 based
> kernel and mounted with v3.2-rc7-83-g115e8e7 , it crashed immediately.
> It's quite possible that the disk is to blame, it's an old 160G
> SP1614C, but syslog does not contain any error messages. I'm not sure
idank wrote:
> Hi all,
> I was running fstest (http://www.tuxera.com/community/posix-test-suite/) on
> btrfs. Only one test failed, and I believe it to be a bug in btrfs. The
> scenario is as follows:
> * crate a file.
> * note its times with stat.
> * sleep a few seconds
> * call truncate() on t
Jan Schmidt wrote:
> This patch series is a major rewrite of the backref walking code. The patch
> series Arne sent some weeks ago for quota groups had a very interesting
> function, find_all_roots. I took this from him together with the bits needed
> for find_all_roots to work and replaced a major
Fajar A. Nugraha wrote:
> On Thu, Dec 29, 2011 at 4:39 PM, Li Zefan wrote:
>> Fajar A. Nugraha wrote:
>>> On Wed, Dec 28, 2011 at 11:57 PM, Martin Steigerwald
>>> wrote:
>>>> But BTRFS does not:
>>>>
>>>> merkaba:~> fstrim -v
/: 152240128 bytes were trimmed
Because caches for block groups smaller than 100M will not be written
to disk, we'll still have to trim them.
Signed-off-by: Li Zefan
---
fs/btrfs/ctree.h|1 +
fs/btrfs/free-space-cache.c | 19 ---
2 files changed, 17 insertions(
By remembering which areas has been trimmed, we can speed up
fstrim significantly.
# fstrim -v /mnt/
/mnt/: 152772608 bytes were trimmed
# fstrim -v /mnt/
/mnt/: 0 bytes were trimmed
No bytes has to be trimmed for the second run.
Signed-off-by: Li Zefan
---
fs/btrfs/extent
This field indicates if an entry is an extent or a bitmap, and only 2
bits of it are used.
This patch makes the other bits are avaiable for future use without
breaking old kernels. For example, we're going to use one bit to
mark if the free space has been trimmed.
Signed-off-by: Li
(This patchset is not for merge or review, except the first patch)
By remembering which areas have been trimmed, we can speed up
fstrim significantly.
# fstrim -v /mnt/
/mnt/: 152772608 bytes were trimmed
# fstrim -v /mnt/
/mnt/: 0 bytes were trimmed
To implement this, after a fr
Fajar A. Nugraha wrote:
> On Wed, Dec 28, 2011 at 11:57 PM, Martin Steigerwald
> wrote:
>> But BTRFS does not:
>>
>> merkaba:~> fstrim -v /
>> /: 4431613952 bytes were trimmed
>> merkaba:~> fstrim -v /
>> /: 4341846016 bytes were trimmed
>
> and apparently it can't trim everything. Or maybe
Martin Steigerwald wrote:
> Hi!
>
> With 3.2-rc4 (probably earlier), Ext4 seems to remember what areas it
> trimmed:
>
> merkaba:~> fstrim -v /boot
> /boot: 224657408 bytes were trimmed
> merkaba:~> fstrim -v /boot
> /boot: 0 bytes were trimmed
>
>
> But BTRFS does not:
>
> merkaba:~> fstrim
We had a bug in btrfs which can be triggered by this test.
Signed-off-by: Li Zefan
---
277 | 71 +++
277.out |1 +
group |1 +
3 files changed, 73 insertions(+), 0 deletions(-)
create mode 100755 277
create mode
Nik Markovic wrote:
> Li Zefan wrote:
>>
>> Nik Markovic wrote:
>>> Hi All,
>>>
>>> I have been encountering consistent btrfs filesystem crashes when
>>> using cp –reflink=always on a large file and modifying it. I believe
>>> that
Nik Markovic wrote:
> Hi All,
>
> I have been encountering consistent btrfs filesystem crashes when
> using cp –reflink=always on a large file and modifying it. I believe
> that the test file needs to be fairly large as I was not able to
> reproduce with smaller files. The filesystem size is 45GB
Phillip Susi wrote:
> The resize ioctl took an optional argument that was a string
> representation of the devid which you wish to resize. For
> the sake of consistency with the other ioctls that take a
> device argument, I converted this to take a device path instead
> of a devid number, and look
>>> On Thu, Dec 08, 2011 at 11:06:47AM -0800, David Marcin wrote:
raid10 metadata and data filesystem. dmesg log follows. The system
is unable to unmount the filesystem after this occurs.
Filesystem mounted at/mnt/btrfs with -o compress,degraded
Command: btrfs device dele
Christoph Hellwig wrote:
> On Fri, Dec 09, 2011 at 09:40:35AM +0800, Li Zefan wrote:
>> To reproduce the bug:
>>
>> # touch /mnt/tmp
>> # stat /mnt/tmp | grep Change
>> Change: 2011-12-09 09:32:23.412105981 +0800
>> # chattr +i /mnt/t
| grep Change
Change: 2011-12-09 09:32:23.412105981 +0800
We should update ctime of in-memory inode before calling
btrfs_update_inode().
Signed-off-by: Li Zefan
---
fs/btrfs/ioctl.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs
evices();
lock(uuid_mutex);
and then we hit a lockdep splat.
Signed-off-by: Li Zefan
---
fs/btrfs/disk-io.c |2 --
fs/btrfs/volumes.c |9 +++--
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 94abc25..b2d103f
space in the filesystem.
Afterwards we add a sprout device to it, and the kernel creates a METADATA
block group and a SYSTEM block group where comes free space we can reserve,
but we still get revervation failure because the global block_rsv hasn't
been updated accordingly.
Signed-off-by
Alexandre Oliva wrote:
> The first 11 patches are relatively simple fixes or improvements that
> I suppose go could make it even in 3.2 (02 is particularly essential
> to avoid progressive performance degradation and metadata space waste
> in the default clustered allocation strategy).
>
I think
Andy Whitcroft wrote:
> On Mon, Nov 28, 2011 at 06:11:06AM -0600, Jonathan Nieder wrote:
>> Hi,
>>
>> Andy Whitcroft wrote:
>>
>>> When we mount a btrfs filesystem from read-only media there will be no
>>> read/write devices; for example mounting an SD card with its lock enabled.
>>> This triggers
igned-off-by: Li Zefan
---
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 c37433d..0a8c8f8 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -1611,7 +1611,7 @@ int btrfs_init_new_device(s
:
# df -h /dev/loop1
FilesystemSize Used Avail Use% Mounted on
/dev/loop1250M 28K 238M 1% /mnt
Signed-off-by: Li Zefan
---
fs/btrfs/super.c |6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index
trim extents only, and the other is to trim bitmaps only.
Signed-off-by: Li Zefan
---
v2: fix possible uninitialized return value
---
fs/btrfs/free-space-cache.c | 235 ++-
1 files changed, 164 insertions(+), 71 deletions(-)
diff --git a/fs/btrfs/free
David Sterba wrote:
> On Thu, Nov 17, 2011 at 03:26:17PM +0800, Li Zefan wrote:
>> diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
>> index 8c32434..89cc54e 100644
>> --- a/fs/btrfs/free-space-cache.c
>> +++ b/fs/btrfs/free-space-cache.c
>>
will have.
Signed-off-by: Li Zefan
---
254 |4 ++--
254.out |4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/254 b/254
index 1cd4832..7b74a02 100755
--- a/254
+++ b/254
@@ -48,7 +48,7 @@ _supported_os Linux
_require_scratch
_scratch_mkfs > /
Hidetoshi Seto wrote:
> (2011/11/18 17:43), Li Zefan wrote:
>> I can't pass 254, and below is the output:
>>
>> 254 3s ... - output mismatch (see 254.out.bad)
>> ...
>> ID 256 top level 5 path snap
>> -ID 257 top level 5 path subvol
>> +ID 258
es in the root tree, and they
consume some IDs, and that's why "subvol" has the ID 258 but not 257.
Just disable space cache for this test case.
Signed-off-by: Li Zefan
---
254 |2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/254 b/254
index 5216120..1cd4
The usage is 'btrfs subvolume set-default ', not
' '.
The code happens to work because strotoull(path) returns 0, but it
will fail if in the future we check the argument more strict in
btrfs-progs.
Signed-off-by: Li Zefan
---
254 |4 ++--
1 files changed, 2 insert
trim extents only, and the other is to trim bitmaps only.
Signed-off-by: Li Zefan
---
fs/btrfs/free-space-cache.c | 235 ++-
1 files changed, 164 insertions(+), 71 deletions(-)
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index
itmap [0, 256].
The cause is, the list is constructed in setup_cluster_no_bitmap(),
and only bitmaps with bitmap_entry->offset >= offset will be added
into the list, and the very bitmap that convers offset has
bitmap_entry->offset <= offset.
Signed-off-by: Li Zefan
---
v2: fix a N
setup_cluster_no_bitmap() searches all the extents and bitmaps starting
from offset. Therefore if it returns -ENOSPC, all the bitmaps starting
from offset are in the bitmaps list, so it's sufficient to search from
this list in setup_cluser_bitmap().
Signed-off-by: Li Zefan
---
fs/btrfs
ways set offset=0 when calling
btrfs_find_space_cluster(), but it may change in the future, for example
to improve for SSD_SPREAD.
Signed-off-by: Li Zefan
---
fs/btrfs/free-space-cache.c | 12
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/fs/btrfs/free-space-cache.
(as this is going to be merged into mainline..)
> +/*
> + * calls iterate() for every inode that references the extent identified by
> + * the given parameters. will use the path given as a parameter and return it
> + * released.
> + * when the iterator function returns a non-zero value, iteration
> When the FS is mounted with compress:
>
> ~# mkfs.btrfs ./a
> nodesize 4096 leafsize 4096 sectorsize 4096 size 2.00GB
> ~# mount -o compress ./a /mnt/1
> ~# cd /mnt/1
> /mnt/1# yes | head -c400M > a
> /mnt/1# sync
> /mnt/1# df -h .
> Filesystem Size Used Avail Use% Mounted on
> /de
Stephane Chazelas wrote:
> I don't quite understand the behavior of "btrfs fi defrag"
>
> ~# truncate -s2G ~/a
> ~# mkfs.btrfs ~/a
> nodesize 4096 leafsize 4096 sectorsize 4096 size 2.00GB
> ~# mount -o loop ~/a /mnt/1
> /mnt/1# cd x
> /mnt/1# df -h .
> Filesystem Size Used Avail Use
16:48, Dan Merillat wrote:
> On Fri, Sep 2, 2011 at 4:42 AM, Christoph Hellwig wrote:
>> On Fri, Sep 02, 2011 at 03:56:25PM +0800, Li Zefan wrote:
>>> There's an off-by-one bug:
>>>
>>> # create a file with lots of 4K file extents
>>> # btrfs
You can try it out:
http://marc.info/?l=linux-btrfs&m=131495014823121&w=2
With this bug fixed, I think autodefrag won't be problematic.
--
Li Zefan
--
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
Chester wrote:
> Kernel 3.1-rc8
> btrfs-progs-0.19
> mount options: noatime,autodefrag (space_cache is enabled)
> There are snapshots present on the filesystem.
>
> When I do a btrfs fi defrag on a file, the file becomes much more
> fragmented. The end result can be a file with 20k times more frag
s [8K, 200K] and then writes [0, 8K].
I tried to make writeback know if the pages are dirtied by defrag,
but the patch was a bit intrusive. Here I simply set writeback_index
when we defrag a file.
Signed-off-by: Li Zefan
---
fs/btrfs/ioctl.c |7 +++
1 files changed, 7 insertions(+), 0 de
01:17, Artem worte:
> Hi!
>
> So, it makes sense to keep the compression on by default
> and with LZO many people are going there.
>
> But, I want to create a database on a compressed btrfs filesystem
> which is seek-heavy rather than throughput-heavy
> and I really want to turn the compression o
Roman Kapusta wrote:
> Segfault and kernel bug after reflinking several files (20-30 files)
> each of size around 1GB through following command:
>
> cp -r --reflink sorce_dir .
> Segmentation fault
>
> I'm on Fedora 15, kernel 3.0.4
This has been fixed in Linux 3.1-rc7.
--
To unsubscribe from t
07:06, Maciej Marcin Piechotka wrote:
> On Mon, 2011-09-19 at 10:53 +0800, Li Zefan wrote:
>> Maciej Marcin Piechotka wrote:
>>> I've noticed that:
>>>
>>> - with x86-64 Fedora 15 DVD install images:
>>>- du -sh was 36 GB
>>&
Li Zefan wrote:
> Maciej Marcin Piechotka wrote:
>> I've noticed that:
>>
>> - with x86-64 Fedora 15 DVD install images:
>>- du -sh was 36 GB
>>- btrfs df | grep -i data have shown over 40 GB used
>> - without
>>- du -sh is 34 GB
&g
ocks
> cloner: locks extent, clones, unlocks extent
>
(besides Chris' comments)
How can we avoid the race on dst file by locking src file extent state..
--
Li Zefan
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord
e marked as uncompressable.
I just tried with Fedora-14-i386-DVD.iso, and the first 896K is compressed,
with a compress ratio about 71.7%, and the remaining data is not compressed.
--
Li Zefan
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a messa
It's a bug in commit f81c9cdc567cd3160ff9e64868d9a1a7ee226480
(Btrfs: truncate pages from clone ioctl target range)
We should pass the dest range to the truncate function, but not the
src range.
Also move the function before locking extent state.
Signed-off-by: Li Zefan
---
fs/btrfs/io
David Sterba wrote:
> On Wed, Sep 14, 2011 at 01:25:21PM +0800, Li Zefan wrote:
>> It's because part of the file is checksummed and the other part is not,
>> and then btrfs will complain checksum is not found when we read the file.
>>
>> Disallow file clone if
14:06, Jeff Liu wrote:
> Signed-off-by: Jie Liu
>
> ---
> 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 +40
The dst file will have the same inode flags with dst file after
file clone, and I think it's unexpected.
For example, the dst file will suddenly become immutable after
getting some share of data with src file, if the src is immutable.
Signed-off-by: Li Zefan
---
fs/btrfs/ioctl.c |1
src and dst file have different checksum flag,
so we ensure a file is completely checksummed or unchecksummed.
Signed-off-by: Li Zefan
---
fs/btrfs/ioctl.c |5 +
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 970977a..dc82bbb 100644
1 - 100 of 343 matches
Mail list logo