Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1335868 > unrolled thread

[PATCH] writeback: initialize inode members that track writeback history

Started byTahsin Erdogan <tahsin@google.com>
First post2016-02-16 22:40 +0100
Last post2016-02-17 16:40 +0100
Articles 3 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] writeback: initialize inode members that track writeback history Tahsin Erdogan <tahsin@google.com> - 2016-02-16 22:40 +0100
    Re: [PATCH] writeback: initialize inode members that track writeback  history Tejun Heo <tj@kernel.org> - 2016-02-16 23:00 +0100
      Re: [PATCH] writeback: initialize inode members that track writeback  history Jens Axboe <axboe@kernel.dk> - 2016-02-17 16:40 +0100

#1335868 — [PATCH] writeback: initialize inode members that track writeback history

FromTahsin Erdogan <tahsin@google.com>
Date2016-02-16 22:40 +0100
Subject[PATCH] writeback: initialize inode members that track writeback history
Message-ID<r2VvI-530-29@gated-at.bofh.it>
inode struct members that track cgroup writeback information
should be reinitialized when inode gets allocated from
kmem_cache. Otherwise, their values remain and get used by the
new inode.

Signed-off-by: Tahsin Erdogan <tahsin@google.com>
Acked-by: Tejun Heo <tj@kernel.org>
---
 fs/inode.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/fs/inode.c b/fs/inode.c
index 9f62db3..69b8b52 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -154,6 +154,12 @@ int inode_init_always(struct super_block *sb, struct inode *inode)
 	inode->i_rdev = 0;
 	inode->dirtied_when = 0;
 
+#ifdef CONFIG_CGROUP_WRITEBACK
+	inode->i_wb_frn_winner = 0;
+	inode->i_wb_frn_avg_time = 0;
+	inode->i_wb_frn_history = 0;
+#endif
+
 	if (security_inode_alloc(inode))
 		goto out;
 	spin_lock_init(&inode->i_lock);
-- 
2.7.0.rc3.207.g0ac5344

[toc] | [next] | [standalone]


#1335883 — Re: [PATCH] writeback: initialize inode members that track writeback history

FromTejun Heo <tj@kernel.org>
Date2016-02-16 23:00 +0100
SubjectRe: [PATCH] writeback: initialize inode members that track writeback history
Message-ID<r2VP7-5bH-53@gated-at.bofh.it>
In reply to#1335868
Hello,

On Tue, Feb 16, 2016 at 01:34:39PM -0800, Tahsin Erdogan wrote:
> inode struct members that track cgroup writeback information
> should be reinitialized when inode gets allocated from
> kmem_cache. Otherwise, their values remain and get used by the
> new inode.
> 
> Signed-off-by: Tahsin Erdogan <tahsin@google.com>
> Acked-by: Tejun Heo <tj@kernel.org>

This one should go for 4.5 and also prolly have the following tag.

Fixes: d10c80955265 ("writeback: implement foreign cgroup inode bdi_writeback switching")

Thanks.

-- 
tejun

[toc] | [prev] | [next] | [standalone]


#1336521 — Re: [PATCH] writeback: initialize inode members that track writeback history

FromJens Axboe <axboe@kernel.dk>
Date2016-02-17 16:40 +0100
SubjectRe: [PATCH] writeback: initialize inode members that track writeback history
Message-ID<r3cmS-8kt-5@gated-at.bofh.it>
In reply to#1335883
On 02/16/2016 02:49 PM, Tejun Heo wrote:
> Hello,
>
> On Tue, Feb 16, 2016 at 01:34:39PM -0800, Tahsin Erdogan wrote:
>> inode struct members that track cgroup writeback information
>> should be reinitialized when inode gets allocated from
>> kmem_cache. Otherwise, their values remain and get used by the
>> new inode.
>>
>> Signed-off-by: Tahsin Erdogan <tahsin@google.com>
>> Acked-by: Tejun Heo <tj@kernel.org>
>
> This one should go for 4.5 and also prolly have the following tag.
>
> Fixes: d10c80955265 ("writeback: implement foreign cgroup inode bdi_writeback switching")

I've added it for 4.5 with the fixes tag.

-- 
Jens Axboe

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web