lkml.org 
[lkml]   [2010]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 1/3] bdi: Use parent filesystem BDI for inodes not capable of writeback
    > +static struct backing_dev_info *inode_to_bdi(struct inode *inode)
    > +{
    > + struct backing_dev_info *bdi = inode->i_mapping->backing_dev_info;
    > +
    > + /*
    > + * This is a hack but it solves a problem with device inode
    > + * for e.g. /dev/zero getting dirty (via touch or so) and confusing
    > + * writeback code. In such cases we return the "parent" filesystem's
    > + * bdi.
    > + */
    > + if (bdi_cap_writeback_dirty(bdi))
    > + return bdi;
    > + return inode->i_sb->s_bdi;

    When do we ever have a writeback-capable bdi that sits inside another
    filesystem? I think just always using inode->i_sb->s_bdi is the right
    thing here.

    And btw, having a BDI_CAP_NO_WRITEBACK instead of a BDI_CAP_WRITEBACK
    is rather dumb, we'd better fix it up while we're at it.



    \
     
     \ /
      Last update: 2010-07-27 19:11    [W:0.018 / U:29.252 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site