On Sun, Oct 25, 2015 at 01:33:45PM -0400, Jeff Mahoney wrote:
>
> On Oct 25, 2015, at 3:50 PM, Alexandru Moise <00moses.alexande...@gmail.com>
> wrote:
>
> >>> This allows us to trim out half of btrfs_init_delayed_node() which
> >>> i
> > This allows us to trim out half of btrfs_init_delayed_node() which
> > is now reduntant.
>
> It's redundant if kmem_cache_zalloc is used, but you haven't
> documented that doing so is now required. For all of these changes
> you've posted, if they're to be accepted, I'd really prefer to set
It's slightly cleaner to zero-out the delayed node upon allocation
than to do it by hand in btrfs_init_delayed_node() for a few members
Signed-off-by: Alexandru Moise <00moses.alexande...@gmail.com>
---
v2: Thanks Jeff Mahoney for pointing out the mistake of removing
the atomic_set
This allows us to trim out half of btrfs_init_delayed_node()
which is now reduntant.
Signed-off-by: Alexandru Moise <00moses.alexande...@gmail.com>
---
fs/btrfs/delayed-inode.c | 8 +---
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/d
Signed-off-by: Alexandru Moise <00moses.alexande...@gmail.com>
---
fs/btrfs/transaction.c | 15 ++-
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index a5b0644..cb50f53 100644
--- a/fs/btrfs/transaction.c
+++ b/fs
Conform to __btrfs_fs_incompat() cast-to-bool (!!) by explicitly
returning boolean not int.
Signed-off-by: Alexandru Moise <00moses.alexande...@gmail.com>
---
fs/btrfs/ctree.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 9
On Tue, Sep 29, 2015 at 02:32:29PM +0200, David Sterba wrote:
> On Sat, Sep 26, 2015 at 12:05:19PM +0000, Alexandru Moise wrote:
> > fs_path_alloc() either returns an alloc'ed struct fs_path
> > or NULL, no need to initialize the pointer to NULL.
> >
> > Sig
The value of num_items that start_transaction() ultimately
always takes is a small one, so a 64 bit integer is overkill.
Also change num_items for btrfs_start_transaction() and
btrfs_start_transaction_lflush() as well.
Signed-off-by: Alexandru Moise <00moses.alexande...@gmail.com>
rsv_count ultimately gets passed to start_transaction() which
now takes an unsigned int as its num_items parameter.
The value of rsv_count should always be positive so declare it
as being unsigned.
Signed-off-by: Alexandru Moise <00moses.alexande...@gmail.com>
---
v2: followed dave's sugge
Improve readability by generalizing the profile validity checks.
Signed-off-by: Alexandru Moise <00moses.alexande...@gmail.com>
---
v2: Followed Dave's suggestion and renamed function to
validate_convert_profile instead of balance_relocate_invalid
fs/btrfs/volumes.
On Tue, Sep 22, 2015 at 03:04:54PM +0200, David Sterba wrote:
> On Mon, Sep 07, 2015 at 05:24:37PM +0300, Alexandru Moise wrote:
> > Use memset() to null out the btrfs_delayed_ref_root of
> > btrfs_transaction instead of setting all the members to 0 by hand.
> >
> > Sig
On Tue, Sep 22, 2015 at 03:09:33PM +0200, David Sterba wrote:
> On Sun, Sep 13, 2015 at 06:47:20PM +0000, Alexandru Moise wrote:
> > Signed-off-by: Alexandru Moise <00moses.alexande...@gmail.com>
> > ---
> > v2: Forgot to add transaction.h when I made the com
Signed-off-by: Alexandru Moise <00moses.alexande...@gmail.com>
---
fs/btrfs/transaction.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index 8f259b3..8a83acd 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transac
This patch completes the 2-patches patch series which modifies
btrfs_start_transaction() to receive an u64 as its "num_items"
parameter thus avoiding to pass an int to start_transaction()
which actually takes an u64.
Signed-off-by: Alexandru Moise <00moses.alexande...@gmail.com&g
Signed-off-by: Alexandru Moise <00moses.alexande...@gmail.com>
---
v2: Forgot to add transaction.h when I made the commit, many thanks
Holger for pointing it out.
fs/btrfs/transaction.c | 2 +-
fs/btrfs/transaction.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs
On Sun, Sep 13, 2015 at 02:53:14PM +, Holger Hoffstätte wrote:
> On Sun, 13 Sep 2015 14:29:41 +0000, Alexandru Moise wrote:
>
> > Signed-off-by: Alexandru Moise <00moses.alexande...@gmail.com>
> > ---
> > fs/btrfs/transaction.c | 2 +-
> > 1 file
On Sun, Sep 13, 2015 at 02:53:14PM +, Holger Hoffstätte wrote:
> On Sun, 13 Sep 2015 14:29:41 +0000, Alexandru Moise wrote:
>
> > Signed-off-by: Alexandru Moise <00moses.alexande...@gmail.com>
> > ---
> > fs/btrfs/transaction.c | 2 +-
> > 1 file
Rather than have three separate if() statements for the same outcome
we should just OR them together in the same if() statement.
Signed-off-by: Alexandru Moise <00moses.alexande...@gmail.com>
---
fs/btrfs/extent-tree.c | 10 +++---
1 file changed, 3 insertions(+), 7 deletions(-)
diff
On Mon, Sep 07, 2015 at 02:24:20PM +0200, David Sterba wrote:
> On Sun, Sep 06, 2015 at 12:25:27PM +0000, Alexandru Moise wrote:
> > Use memset() to null out the btrfs_delayed_ref_root of
> > btrfs_transaction instead of setting all the members to 0 by hand.
> >
> > Sig
Use memset() to null out the btrfs_delayed_ref_root of
btrfs_transaction instead of setting all the members to 0 by hand.
Signed-off-by: Alexandru Moise <00moses.alexande...@gmail.com>
---
fs/btrfs/transaction.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --gi
On Mon, Sep 07, 2015 at 04:01:22PM +0200, David Sterba wrote:
> So, updated patches should mention that in the subject eg:
>
> [PATCH v2] btrfs: memset cur_trans->delayed_refs to zero
>
> On Mon, Sep 07, 2015 at 04:45:02PM +0300, Alexandru Moise wrote:
> >
Use memset() to null out the btrfs_delayed_ref_root of
btrfs_transaction instead of setting all the members to 0 by hand.
Signed-off-by: Alexandru Moise <00moses.alexande...@gmail.com>
---
Rather than setting each member of ->delayed_refs by hand we should
adhere to the practice of usi
Use memset() to null out the btrfs_delayed_ref_root of
btrfs_transaction instead of setting all the members to 0 by hand.
Signed-off-by: Alexandru Moise <00moses.alexande...@gmail.com>
---
fs/btrfs/transaction.c | 10 +-
1 file changed, 1 insertion(+), 9 deletions(-)
diff --gi
On Mon, Aug 31, 2015 at 09:44:49AM +0800, Qu Wenruo wrote:
> >>>From the perspective of users, qgroup's referenced or exclusive
> >>is negative,but user can not continue to write data! a workaround
> >>way is to cast u64 to s64 when doing qgroup reservation
> >
> >I am unable to
On Mon, Aug 31, 2015 at 02:51:08PM +0800, Qu Wenruo wrote:
>
>
> Alexandru Moise wrote on 2015/08/31 09:32 +0300:
> >On Mon, Aug 31, 2015 at 09:44:49AM +0800, Qu Wenruo wrote:
> >>>>>From the perspective of users, qgroup's referenced or exclusive
&
Improve readability by generalizing the profile validity checks,
I had to read through those if statements half a dozen times on my
first try just to get an idea of what's happening there.
Signed-off-by: Alexandru Moise 00moses.alexande...@gmail.com
---
fs/btrfs/volumes.c | 21
can not continue to write data! a workaround
way is to cast u64 to s64 when doing qgroup reservation
I am unable to reproduce this problem without his modification.
I could be wrong in reverting this, so I'm gonna CC Wang as well so
he is aware of this patch.
Signed-off-by: Alexandru Moise
On Fri, Aug 28, 2015 at 07:38:56PM +0200, David Sterba wrote:
On Thu, Aug 27, 2015 at 11:53:45PM +, Alexandru Moise wrote:
Just call kmem_cache_zalloc() instead of calling kmem_cache_alloc().
We're just initializing most fields to 0, false and NULL later on
_anyway_, so to make the code
on allocation then just initialize
those five remaining fields (not counting the list_heads) as normal.
Signed-off-by: Alexandru Moise 00moses.alexande...@gmail.com
---
fs/btrfs/transaction.c | 15 +--
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/fs/btrfs
old_len is used to store the return value of btrfs_item_size_nr().
The return value of btrfs_item_size_nr() is of type u32.
To improve code correctness and avoid mixing signed and unsigned
integers I've changed old_len to be of type u32 as well.
Signed-off-by: Alexandru Moise 00moses.alexande
The return values of btrfs_item_offset_nr and btrfs_item_size_nr are of
type u32. To avoid mixing signed and unsigned integers we should also
declare dsize and last_off to be of type u32.
Signed-off-by: Alexandru Moise 00moses.alexande...@gmail.com
---
fs/btrfs/ctree.c | 4 ++--
1 file changed
31 matches
Mail list logo