diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-09-09 09:10:25 +0200 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-09-11 09:20:26 +0200 |
commit | 500b067c5e6ceea49cf280a02597b1169320e08c (patch) | |
tree | 5e2e9bfd66f825f845fdf395b6303b884769ff6d /fs/fs-writeback.c | |
parent | d993831fa7ffeb89e994f046f93eeb09ec91df08 (diff) | |
download | blackbird-op-linux-500b067c5e6ceea49cf280a02597b1169320e08c.tar.gz blackbird-op-linux-500b067c5e6ceea49cf280a02597b1169320e08c.zip |
writeback: check for registered bdi in flusher add and inode dirty
Also a debugging aid. We want to catch dirty inodes being added to
backing devices that don't do writeback.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'fs/fs-writeback.c')
-rw-r--r-- | fs/fs-writeback.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 2e601ce581c9..da86ef58e427 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -1046,6 +1046,14 @@ void __mark_inode_dirty(struct inode *inode, int flags) */ if (!was_dirty) { struct bdi_writeback *wb = &inode_to_bdi(inode)->wb; + struct backing_dev_info *bdi = wb->bdi; + + if (bdi_cap_writeback_dirty(bdi) && + !test_bit(BDI_registered, &bdi->state)) { + WARN_ON(1); + printk(KERN_ERR "bdi-%s not registered\n", + bdi->name); + } inode->dirtied_when = jiffies; list_move(&inode->i_list, &wb->b_dirty); |