* [PATCH] cifs: set backing_dev_info on new S_ISREG inodes
@ 2010-09-29 13:49 Jeff Layton
[not found] ` <1285768194-29595-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Jeff Layton @ 2010-09-29 13:49 UTC (permalink / raw)
To: smfrench-Re5JQEeQqe8AvxtiuMwx3w
Cc: linux-fsdevel-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-cifs-u79uwXL29TY76Z2rM5mHXA, stable-DgEjT+Ai2ygdnm+yROfE0A
Testing on very recent kernel (2.6.36-rc6) made this warning pop:
WARNING: at fs/fs-writeback.c:87 inode_to_bdi+0x65/0x70()
Hardware name:
Dirtiable inode bdi default != sb bdi cifs
...the following patch fixes it and seems to be the obviously correct
thing to do for cifs.
Cc: stable-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
Signed-off-by: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
fs/cifs/inode.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 2256124..d6db805 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -853,6 +853,8 @@ retry_iget5_locked:
inode->i_flags |= S_NOATIME | S_NOCMTIME;
if (inode->i_state & I_NEW) {
inode->i_ino = hash;
+ if (S_ISREG(inode->i_mode))
+ inode->i_data.backing_dev_info = sb->s_bdi;
#ifdef CONFIG_CIFS_FSCACHE
/* initialize per-inode cache cookie pointer */
CIFS_I(inode)->fscache = NULL;
--
1.7.2.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] cifs: set backing_dev_info on new S_ISREG inodes
[not found] ` <1285768194-29595-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2010-09-29 23:17 ` Christoph Hellwig
[not found] ` <20100929231730.GA6921-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2010-09-29 23:17 UTC (permalink / raw)
To: Jeff Layton
Cc: smfrench-Re5JQEeQqe8AvxtiuMwx3w,
linux-fsdevel-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-cifs-u79uwXL29TY76Z2rM5mHXA, stable-DgEjT+Ai2ygdnm+yROfE0A
On Wed, Sep 29, 2010 at 09:49:54AM -0400, Jeff Layton wrote:
> Testing on very recent kernel (2.6.36-rc6) made this warning pop:
>
> WARNING: at fs/fs-writeback.c:87 inode_to_bdi+0x65/0x70()
> Hardware name:
> Dirtiable inode bdi default != sb bdi cifs
>
> ...the following patch fixes it and seems to be the obviously correct
> thing to do for cifs.
See my patch in the btrfs/default_backing_dev_info thread for the real
fix for the underlying issue. But your patch won't harm either way.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] cifs: set backing_dev_info on new S_ISREG inodes
[not found] ` <20100929231730.GA6921-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
@ 2010-09-30 11:26 ` Jeff Layton
0 siblings, 0 replies; 3+ messages in thread
From: Jeff Layton @ 2010-09-30 11:26 UTC (permalink / raw)
To: Christoph Hellwig
Cc: smfrench-Re5JQEeQqe8AvxtiuMwx3w,
linux-fsdevel-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-cifs-u79uwXL29TY76Z2rM5mHXA, stable-DgEjT+Ai2ygdnm+yROfE0A
On Wed, 29 Sep 2010 19:17:30 -0400
Christoph Hellwig <hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org> wrote:
> On Wed, Sep 29, 2010 at 09:49:54AM -0400, Jeff Layton wrote:
> > Testing on very recent kernel (2.6.36-rc6) made this warning pop:
> >
> > WARNING: at fs/fs-writeback.c:87 inode_to_bdi+0x65/0x70()
> > Hardware name:
> > Dirtiable inode bdi default != sb bdi cifs
> >
> > ...the following patch fixes it and seems to be the obviously correct
> > thing to do for cifs.
>
> See my patch in the btrfs/default_backing_dev_info thread for the real
> fix for the underlying issue. But your patch won't harm either way.
>
Thanks Christoph. I looked to NFS as a model for this, which does a
very similar thing in nfs_fhget. It's probably reasonable for us to set
this here in case there is further churn in the VFS for this sort of
thing.
--
Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-09-30 11:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-29 13:49 [PATCH] cifs: set backing_dev_info on new S_ISREG inodes Jeff Layton
[not found] ` <1285768194-29595-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2010-09-29 23:17 ` Christoph Hellwig
[not found] ` <20100929231730.GA6921-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2010-09-30 11:26 ` Jeff Layton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).