* [PATCH] writeback: initialize inode members that track writeback history
@ 2016-02-16 19:10 Tahsin Erdogan
2016-02-16 21:13 ` Tejun Heo
0 siblings, 1 reply; 5+ messages in thread
From: Tahsin Erdogan @ 2016-02-16 19:10 UTC (permalink / raw)
To: Tejun Heo, Alexander Viro; +Cc: linux-fsdevel, linux-kernel, Tahsin Erdogan
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>
---
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] writeback: initialize inode members that track writeback history
2016-02-16 19:10 [PATCH] writeback: initialize inode members that track writeback history Tahsin Erdogan
@ 2016-02-16 21:13 ` Tejun Heo
0 siblings, 0 replies; 5+ messages in thread
From: Tejun Heo @ 2016-02-16 21:13 UTC (permalink / raw)
To: Tahsin Erdogan; +Cc: Alexander Viro, linux-fsdevel, linux-kernel
On Tue, Feb 16, 2016 at 11:10:35AM -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>
It might make sense to route this through block with the other
writeback fix. Can you please repost with Jens Axboe
<axboe@kernel.dk> cc'd?
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] writeback: initialize inode members that track writeback history
2016-02-16 21:49 ` Tejun Heo
@ 2016-02-17 15:30 ` Jens Axboe
0 siblings, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2016-02-17 15:30 UTC (permalink / raw)
To: Tejun Heo, Tahsin Erdogan; +Cc: Alexander Viro, linux-fsdevel, linux-kernel
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] writeback: initialize inode members that track writeback history
2016-02-16 21:34 Tahsin Erdogan
@ 2016-02-16 21:49 ` Tejun Heo
2016-02-17 15:30 ` Jens Axboe
0 siblings, 1 reply; 5+ messages in thread
From: Tejun Heo @ 2016-02-16 21:49 UTC (permalink / raw)
To: Tahsin Erdogan; +Cc: Alexander Viro, Jens Axboe, linux-fsdevel, linux-kernel
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH] writeback: initialize inode members that track writeback history
@ 2016-02-16 21:34 Tahsin Erdogan
2016-02-16 21:49 ` Tejun Heo
0 siblings, 1 reply; 5+ messages in thread
From: Tahsin Erdogan @ 2016-02-16 21:34 UTC (permalink / raw)
To: Tejun Heo, Alexander Viro
Cc: Jens Axboe, linux-fsdevel, linux-kernel, Tahsin Erdogan
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
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-02-17 15:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-16 19:10 [PATCH] writeback: initialize inode members that track writeback history Tahsin Erdogan
2016-02-16 21:13 ` Tejun Heo
2016-02-16 21:34 Tahsin Erdogan
2016-02-16 21:49 ` Tejun Heo
2016-02-17 15:30 ` Jens Axboe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.