[PATCH] Btrfs: fix memory leak in start_transaction()

2012-09-19 Thread Miao Xie
This patch fixes memory leak of the transaction handle which happened when starting transaction failed on a freezed fs. Signed-off-by: Miao Xie --- This patch is based on btrfs-next tree --- fs/btrfs/transaction.c |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/fs/btr

[PATCH V2 1/2] Btrfs: cleanup duplicated division functions

2012-09-19 Thread Miao Xie
div_factor{_fine} has been implemented for two times, cleanup it. And I move them into a independent file named math.h because they are common math functions. Because those functions are mostly used on the hot path, and we are sure the parameters are right in the most cases, we don't add complex c

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: Experiences: Why BTRFS had to yield for ZFS

2012-09-19 Thread Casper Bang
Chris Mason fusionio.com> writes: > There are three basic problems with the database workloads on btrfs. > First is that we have higher latencies on writes because we are feeding > everything through helper threads for crcs. Usually the extra latencies > don't show up because we have enough work

[PATCH] Btrfs: handle not finding the extent exactly when logging changed extents

2012-09-19 Thread Josef Bacik
I started hitting warnings when running xfstest 68 in a loop because there were EM's that were not lined up properly with the physical extents. This is ok, if we do something like punch a hole or write to a preallocated space or something like that we can have an EM that doesn't cover the entire p

Re: "free space cache generation" ?

2012-09-19 Thread Josef Bacik
On Wed, Sep 19, 2012 at 11:54:38AM -0600, Swâmi Petaramesh wrote: > Le 19/09/2012 19:36, Josef Bacik a écrit : > > It can happen for all sorts of different reasons. Did you have a > > unclean unmount at some point? > > Not that I'm aware of... > > > Do you have a particularly full file system? >

Re: "free space cache generation" ?

2012-09-19 Thread Swâmi Petaramesh
Le 19/09/2012 19:36, Josef Bacik a écrit : > It can happen for all sorts of different reasons. Did you have a > unclean unmount at some point? Not that I'm aware of... > Do you have a particularly full file system? ~1 TB FS, 23% full... Only, I have several Linux distros installed on the same B

Re: enquiry about autodefrag option

2012-09-19 Thread Martin Steigerwald
Am Mittwoch, 19. September 2012 schrieb Liu Bo: > On 09/19/2012 07:28 PM, ching wrote: […] > > 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

Re: "free space cache generation" ?

2012-09-19 Thread Swâmi Petaramesh
Le 19/09/2012 18:01, Josef Bacik a écrit : > Yeah I need to just put those under a DEBUG ifdef, they aren't a big > deal, just letting you know that the on disk cache is invalid and it > will have to put it together ye olde fashioned way. ...But is it supposed to, and how to fix it ? -- Swâmi Pe

Re: "free space cache generation" ?

2012-09-19 Thread Josef Bacik
On Wed, Sep 19, 2012 at 11:30:39AM -0600, Swâmi Petaramesh wrote: > Le 19/09/2012 18:01, Josef Bacik a écrit : > > Yeah I need to just put those under a DEBUG ifdef, they aren't a big > > deal, just letting you know that the on disk cache is invalid and it > > will have to put it together ye olde f

Re: [PATCH] Btrfs: fix off-by-one in file clone

2012-09-19 Thread David Sterba
On Tue, Sep 18, 2012 at 05:52:23PM +0800, Liu Bo wrote: > Btrfs uses inclusive range end for lock_extent(), unlock_extent() and > related functions, so we made off-by-one errors in file clone. We're lucky that it's off-by-one in a way that it locks more than it should. The function is full of such

Re: "free space cache generation" ?

2012-09-19 Thread Josef Bacik
On Wed, Sep 19, 2012 at 02:05:41AM -0600, Swâmi Petaramesh wrote: > Hi there, > > I noticed my syslog is filling up with tons of: > > btrfs: free space inode generation (0) did not match free space cache > generation (25326) > Yeah I need to just put those under a DEBUG ifdef, they aren't a bi

Re: Experiences: Why BTRFS had to yield for ZFS

2012-09-19 Thread Chris Mason
On Mon, Sep 17, 2012 at 02:45:08AM -0600, Casper Bang wrote: > Abstract > For database testing purposes, a COW filesystem was needed in order to > facilitate snapshotting and rollback, such as to provide mirrors of > our production database at fixed intervals (every night and by > demand). Thanks

Re: enquiry about autodefrag option

2012-09-19 Thread Liu Bo
On 09/19/2012 07:28 PM, ching wrote: > 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: >> >>

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: > >autodrag -> number of extent decrease -> me

Re: [PATCH 2/2] Btrfs-progs: add mount-option command

2012-09-19 Thread Hidetoshi Seto
(2012/09/18 21:30), David Sterba wrote: > On Tue, Sep 18, 2012 at 10:30:17AM +0900, Hidetoshi Seto wrote: ... > > So, you're basically implementing subset of the whole-filesystem > options. As has been mentioned, alternate way is to use the 'properties' > interface as a global entry point from the

Re: [PATCH 2/2] Btrfs-progs: add mount-option command

2012-09-19 Thread Hidetoshi Seto
(2012/09/18 11:31), Miao Xie wrote: > On tue, 18 Sep 2012 10:30:17 +0900, Hidetoshi Seto wrote: >> This patch adds mount-option command. >> The command can set/get default mount options. >> Now, the command can set/get 24 options. >> These options are equal to mount options which store >> in fs_inf

Re: R: [PATCH 2/2] Btrfs-progs: add mount-option command

2012-09-19 Thread Hidetoshi Seto
(2012/09/18 19:03), Goffredo Baroncelli wrote: > Hi Seto, > > please could you update also the man page too ? Sure. I'll update it next time. > Why it was not provided a way to clear a *single* flag ? To me it seems a bit > too long to clear all the flag (btrfs mount-option clear) and then se

Re: [PATCH 1/2] Btrfs: make space to keep default mount options

2012-09-19 Thread Hidetoshi Seto
(2012/09/18 21:10), David Sterba wrote: > On Tue, Sep 18, 2012 at 10:28:48AM +0900, Hidetoshi Seto wrote: >> diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h >> index fa5c45b..3eb0551 100644 >> --- a/fs/btrfs/ctree.h >> +++ b/fs/btrfs/ctree.h >> @@ -458,8 +458,11 @@ struct btrfs_super_block { >>

Re: Experiences: Why BTRFS had to yield for ZFS

2012-09-19 Thread Casper Bang
> IIRC there were some patches post-3.0 which relates to sync. If oracle > db uses sync writes (or call sync somewhere, which it should), it > might help to re-run the test with more recent kernel. kernel-ml > repository might help. Yeah there doesn't seem to be a shortage of patches coming into b

"free space cache generation" ?

2012-09-19 Thread Swâmi Petaramesh
Hi there, I noticed my syslog is filling up with tons of: btrfs: free space inode generation (0) did not match free space cache generation (25326) ...any clue ? TIA. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.or

Re: Experiences: Why BTRFS had to yield for ZFS

2012-09-19 Thread Fajar A. Nugraha
On Wed, Sep 19, 2012 at 2:28 PM, Casper Bang wrote: >> Anand Jain oracle.com> writes: >> archive-log-apply script - if you could, can you share the >> script itself ? or provide more details about the script. >> (It will help to understand the work-load in question). > > Our setup entails a

Re: Experiences: Why BTRFS had to yield for ZFS

2012-09-19 Thread Casper Bang
> Anand Jain oracle.com> writes: > archive-log-apply script - if you could, can you share the > script itself ? or provide more details about the script. > (It will help to understand the work-load in question). Our setup entails a whole bunch of scripts, but the apply script looks like th