X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=include%2Fsys%2Fblkdev.h;h=7f242202ae76e6da51867bcd68075c404722ecec;hb=07bd86718b74b2d8e0f633f1b80e976892eaf329;hp=3dc0fd2a8838bdbcd4b1d1fd03704a24f3d2445d;hpb=f4af6bb783b0b7f2a6075cb1c74c225db8a157b2;p=zfs.git diff --git a/include/sys/blkdev.h b/include/sys/blkdev.h index 3dc0fd2..7f24220 100644 --- a/include/sys/blkdev.h +++ b/include/sys/blkdev.h @@ -163,6 +163,16 @@ __blk_rq_bytes(struct request *req) } #endif /* !HAVE_BLK_RQ_BYTES || HAVE_BLK_RQ_BYTES_GPL_ONLY */ +/* + * Most of the blk_* macros were removed in 2.6.36. Ostensibly this was + * done to improve readability and allow easier grepping. However, from + * a portability stand point the macros are helpful. Therefore the needed + * macros are redefined here if they are missing from the kernel. + */ +#ifndef blk_fs_request +#define blk_fs_request(rq) ((rq)->cmd_type == REQ_TYPE_FS) +#endif + #ifndef HAVE_GET_DISK_RO static inline int get_disk_ro(struct gendisk *disk)