X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Fvfs_compat.h;h=cbbf21e618b6ea5aa2c2230626a44d4f30ea2cc1;hb=12d06bac9b22b11d8a322dfea4bdb50b106c254f;hp=1d8a523cd999082edc2650d93ec7de4000c61a1e;hpb=b312979252c5b566d2f59febcda67f309637e18c;p=zfs.git diff --git a/include/linux/vfs_compat.h b/include/linux/vfs_compat.h index 1d8a523..cbbf21e 100644 --- a/include/linux/vfs_compat.h +++ b/include/linux/vfs_compat.h @@ -62,4 +62,23 @@ truncate_setsize(struct inode *ip, loff_t new) } #endif /* HAVE_TRUNCATE_SETSIZE */ +/* + * 2.6.32 API change, + * Added backing_device_info (bdi) per super block interfaces. When + * available a bdi must be configured when using a non-device backed + * filesystem for proper writeback. It's safe to leave this code + * dormant for kernels which only support pdflush and not bdi. + */ +#ifdef HAVE_BDI +#define bdi_get_sb(sb) (sb->s_bdi) +#define bdi_put_sb(sb, bdi) (sb->s_bdi = bdi) +#else +#define bdi_init(bdi) (0) +#define bdi_destroy(bdi) (0) +#define bdi_register(bdi, parent, fmt, args) (0) +#define bdi_unregister(bdi) (0) +#define bdi_get_sb(sb) (0) +#define bdi_put_sb(sb, bdi) (0) +#endif /* HAVE_BDI */ + #endif /* _ZFS_VFS_H */