Build on the bdi_writeback support by allowing registration ofmore than 1 flusher thread. File systems can call bdi_add_flusher_task(bdi)to add more flusher threads to the device. If they do so, they must alsoprovide a super_operations function to return the suitable bdi_writebackstruct from any given inode.

/*- * We have only a single wb per bdi, so just return that.+ * If the filesystem didn't provide a way to map an inode to a dedicated+ * flusher thread, it doesn't support more than 1 thread. So we know it's+ * the default thread, return that. */ static inline struct bdi_writeback *inode_get_wb(struct inode *inode) {- return &inode_to_bdi(inode)->wb;+ const struct super_operations *sop = inode->i_sb->s_op;++ if (!sop->inode_get_wb)+ return &inode_to_bdi(inode)->wb;++ return sop->inode_get_wb(inode); }