Re: btrfs defrag problem

2012-11-05 Thread ching
On 11/06/2012 06:57 AM, David Sterba wrote: > On Thu, Nov 01, 2012 at 05:17:04AM +0800, ching wrote: >>>> 3. Is any possible to online defrag a btrfs partition without hindered by >>>> mount point/polyinstantied directories? >>> Sorry, I do not understand the q

Re: btrfs defrag problem

2012-10-31 Thread ching
is polyinstantied, files in the original directory is "hidden", and files in the polyinstantied directory is "available", How to get past them and pass those "hidden" files to defrag command? ching -- To unsubscribe from this list: send the line "unsubscribe linux-b

Re: Why btrfs inline small file by default?

2012-10-31 Thread ching
On 10/31/2012 08:12 AM, David Sterba wrote: > On Wed, Oct 31, 2012 at 07:47:14AM +0800, ching wrote: >> On 10/31/2012 06:19 AM, Hugo Mills wrote: >>> On Tue, Oct 30, 2012 at 10:14:12PM +, Hugo Mills wrote: >>>>> if i have 10G small files in total, th

Re: Why btrfs inline small file by default?

2012-10-31 Thread ching
On 10/31/2012 08:18 AM, cwillu wrote: > import os > import sys > > data = "1" * 1024 * 3 > > for x in xrange(100 * 1000): > with open('%s/%s' % (sys.argv[1], x), 'a') as f: > f.write(data) > > root@repository:~$ mount -o loop ~/inline /mnt > root@repository:~$ mount -o loop,max_inline=0 ~/non

Re: btrfs defrag problem

2012-10-30 Thread ching
On 10/30/2012 08:08 PM, cwillu wrote: > On Tue, Oct 30, 2012 at 5:47 AM, ching wrote: >> Hi all, >> >> I try to defrag my btrfs root partition (run by root privilege) >> >> find / -type f -o -type d -print0 | xargs --null --no-run-if-empty btrfs >> f

Re: Why btrfs inline small file by default?

2012-10-30 Thread ching
On 10/31/2012 06:19 AM, Hugo Mills wrote: > On Tue, Oct 30, 2012 at 10:14:12PM +, Hugo Mills wrote: >> On Wed, Oct 31, 2012 at 05:40:25AM +0800, ching wrote: >>> On 10/30/2012 08:17 PM, cwillu wrote: >>>>>> If there is a lot of small files, then the size of

Re: Why btrfs inline small file by default?

2012-10-30 Thread ching
On 10/31/2012 06:16 AM, cwillu wrote: > On Tue, Oct 30, 2012 at 3:40 PM, ching wrote: >> On 10/30/2012 08:17 PM, cwillu wrote: >>>>> If there is a lot of small files, then the size of metadata will be >>>>> undesirable due to deduplication >>>&

Re: Why btrfs inline small file by default?

2012-10-30 Thread ching
the total storage used by > inlining will be _smaller_, as the allocation doesn't need to be > aligned to the sector size. > if i have 10G small files in total, then it will consume 20G by default. ching -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs&qu

Re: Why btrfs inline small file by default?

2012-10-30 Thread ching
On 10/30/2012 08:04 PM, Felix Pepinghege wrote: > Hi ching! > > Am 30.10.2012 12:04, schrieb ching: >> Hi all, >> >> I am testing my btrfs root partition with "max_inline=0", and 64k leaf size >> for weeks and it seems that it is fine. >> >

btrfs defrag problem

2012-10-30 Thread ching
"max_inline=0" 3. Is any possible to online defrag a btrfs partition without hindered by mount point/polyinstantied directories? Thank you. ching -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org

Why btrfs inline small file by default?

2012-10-30 Thread ching
g/msg16295.html http://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg05265.html How about turning off inline so that btrfs works better "out of the box"? ching -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@

Re: typo in inode.c

2012-09-26 Thread ching
On 09/26/2012 11:23 PM, David Sterba wrote: > On Wed, Sep 26, 2012 at 07:48:47PM +0800, ching wrote: >> There is a typo (?) in inode.c (git) > What's the top commit and what git tree? > > This has been fixed in 3.6-rc4 via > 287082b0bd10060e9c6b32ed9605174ddf2f672a >

typo in inode.c

2012-09-26 Thread ching
There is a typo (?) in inode.c (git) i guess the "int limit = 10 * 1024 * 1042;" should be "int limit = 10 * 1024 * 1024;" instead Could developer fix this typo? static int cow_file_range_async(struct inode *inode, struct page *locked_page, u64 start, u64 end, i

Re: [PATCH] Btrfs: do not async metadata csums if we have hardware crc32c

2012-09-25 Thread ching
On 09/25/2012 06:51 PM, David Sterba wrote: > On Mon, Sep 24, 2012 at 11:03:49PM +0200, David Sterba wrote: >> Could you please put the check into a separate helper > Please note that checksum will become a variable per-filesystem > property, stored within the superblock, so the helper should be pa

Re: [PATCH] Btrfs: do not async metadata csums if we have hardware crc32c

2012-09-25 Thread ching
On 09/25/2012 06:51 PM, David Sterba wrote: > On Mon, Sep 24, 2012 at 11:03:49PM +0200, David Sterba wrote: >> Could you please put the check into a separate helper > Please note that checksum will become a variable per-filesystem > property, stored within the superblock, so the helper should be pa

Re: enquiry about autodefrag option

2012-09-20 Thread ching
>> Is there any io niceness control for autodefrag process too? it will >> be nice if the idle class is used. > No. Autodefrag will mark file data dirty and they'll be written back to > the storage in the same way as any other write through the worker > threads. > > AFAIK, the autodefrag will rea

Re: enquiry about autodefrag option

2012-09-19 Thread ching
>>> 2. AFAIK, "autodefrag" detects small random writes into files and >>> queues them up for an automatic defrag process, so the filesystem will >>> defragment itself while it's used. >>> >>> If the system reboot/crash/remount-ro, will the autodefrag process >>> continue after resume? >>> > Fo

Re: enquiry about autodefrag option

2012-09-19 Thread ching
can anybody helps? On 09/17/2012 07:15 PM, ching wrote: > I am testing btrfs for long-term storage and backup, and i would like > to know more about "autodefrag" option: > > 1. Will "autodefrag" option benefit ssd? > > My understanding is: > >

enquiry about autodefrag option (resent)

2012-09-17 Thread ching
I am testing btrfs for long-term storage and backup, and i would like to know more about "autodefrag" option: 1. Will "autodefrag" option benefit ssd? My understanding is: autodrag -> number of extent decrease -> metadata decrease -> a "healthier" filesystem in the long run (P.S.

Re: ssd alignment and btrfs sector size

2012-09-13 Thread ching
On 09/13/2012 09:00 PM, Josef Bacik wrote: > On Thu, Sep 13, 2012 at 12:02:04AM -0600, ching lu wrote: >> I am trying to test btrfs on my ssd, i am studying about btrfs and alignment. >> >> I have read this old mail: >> http://www.mail-archive.com/linux-btrfs@vg

Re: enquiry about defrag

2012-09-11 Thread ching
On 09/11/2012 07:45 PM, David Sterba wrote: > On Tue, Sep 11, 2012 at 07:12:58PM +0800, ching wrote: >>> 1. According to btrfs wiki, defragment a COW file will produce two >>> unrelated files. >>> >>> Does it apply to the "autodefrag" mount

Re: enquiry about defrag

2012-09-11 Thread ching
On 09/09/2012 08:03 AM, ching wrote: > Hi all, > > i am new on btrfs, i am testing KVM on btrfs (host: kernel x86-64 3.5.3), the > performance is reasonable. > > I have two question on defrag, can someone help me? > > 1. According to btrfs wiki, defragment a COW file wi

Re: enquiry about defrag

2012-09-11 Thread ching
On 09/11/2012 09:28 AM, Li Zefan wrote: >> 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. :) > > The problem seems fixed. The number of extent decrease to 14055 after defrag with compression off. --

Re: enquiry about defrag

2012-09-10 Thread ching
On 09/10/2012 09:10 PM, Liu Bo wrote: > On 09/10/2012 08:19 PM, ching wrote: >> On 09/09/2012 08:05 PM, ching wrote: >>> On 09/09/2012 05:11 PM, Fajar A. Nugraha wrote: >>>> On Sun, Sep 9, 2012 at 2:49 PM, ching wrote: >>>>> On 09/09/2012 08:30 AM, J

Re: enquiry about defrag

2012-09-10 Thread ching
On 09/09/2012 08:05 PM, ching wrote: > On 09/09/2012 05:11 PM, Fajar A. Nugraha wrote: >> On Sun, Sep 9, 2012 at 2:49 PM, ching wrote: >>> On 09/09/2012 08:30 AM, Jan Steffens wrote: >>>> On Sun, Sep 9, 2012 at 2:03 AM, ching wrote: >>>>> 2. Is there

Re: enquiry about defrag

2012-09-09 Thread ching
On 09/09/2012 05:11 PM, Fajar A. Nugraha wrote: > On Sun, Sep 9, 2012 at 2:49 PM, ching wrote: >> On 09/09/2012 08:30 AM, Jan Steffens wrote: >>> On Sun, Sep 9, 2012 at 2:03 AM, ching wrote: >>>> 2. Is there any command for the fragmentation status of a file/

Re: enquiry about defrag

2012-09-09 Thread ching
On 09/09/2012 08:30 AM, Jan Steffens wrote: > On Sun, Sep 9, 2012 at 2:03 AM, ching wrote: >> 2. Is there any command for the fragmentation status of a file/dir ? e.g. >> fragment size, number of fragments. > Use the "filefrag" command, part of e2fsprogs. > my im

enquiry about defrag

2012-09-08 Thread ching
Hi all, i am new on btrfs, i am testing KVM on btrfs (host: kernel x86-64 3.5.3), the performance is reasonable. I have two question on defrag, can someone help me? 1. According to btrfs wiki, defragment a COW file will produce two unrelated files. Does it apply to the "autodefrag" mount