block: Make the integrity mapped property a bio flag
[firefly-linux-kernel-4.4.55.git] / include / linux / blk_types.h
index 53691774d34e8f56e56ccdb9eda230597ba53070..d36629620a4fb9143c0e37b0b1a16302afda0efc 100644 (file)
@@ -97,6 +97,7 @@ struct bio {
 #define BIO_NULL_MAPPED 9      /* contains invalid user pages */
 #define BIO_FS_INTEGRITY 10    /* fs owns integrity data, not block layer */
 #define BIO_QUIET      11      /* Make BIO Quiet */
+#define BIO_MAPPED_INTEGRITY 12/* integrity metadata has been remapped */
 #define bio_flagged(bio, flag) ((bio)->bi_flags & (1 << (flag)))
 
 /*
@@ -130,6 +131,8 @@ enum rq_flag_bits {
        /* bio only flags */
        __REQ_UNPLUG,           /* unplug the immediately after submission */
        __REQ_RAHEAD,           /* read ahead, can fail anytime */
+       __REQ_THROTTLED,        /* This bio has already been subjected to
+                                * throttling rules. Don't do it again. */
 
        /* request only flags */
        __REQ_SORTED,           /* elevator knows about this request */
@@ -146,10 +149,10 @@ enum rq_flag_bits {
        __REQ_ORDERED_COLOR,    /* is before or after barrier */
        __REQ_ALLOCED,          /* request came from our alloc pool */
        __REQ_COPY_USER,        /* contains copies of user pages */
-       __REQ_INTEGRITY,        /* integrity metadata has been remapped */
        __REQ_FLUSH,            /* request for cache flush */
        __REQ_IO_STAT,          /* account I/O stat */
        __REQ_MIXED_MERGE,      /* merge of different types, fail separately */
+       __REQ_SECURE,           /* secure discard (used with __REQ_DISCARD) */
        __REQ_NR_BITS,          /* stops here */
 };
 
@@ -171,6 +174,7 @@ enum rq_flag_bits {
 
 #define REQ_UNPLUG             (1 << __REQ_UNPLUG)
 #define REQ_RAHEAD             (1 << __REQ_RAHEAD)
+#define REQ_THROTTLED          (1 << __REQ_THROTTLED)
 
 #define REQ_SORTED             (1 << __REQ_SORTED)
 #define REQ_SOFTBARRIER                (1 << __REQ_SOFTBARRIER)
@@ -186,9 +190,9 @@ enum rq_flag_bits {
 #define REQ_ORDERED_COLOR      (1 << __REQ_ORDERED_COLOR)
 #define REQ_ALLOCED            (1 << __REQ_ALLOCED)
 #define REQ_COPY_USER          (1 << __REQ_COPY_USER)
-#define REQ_INTEGRITY          (1 << __REQ_INTEGRITY)
 #define REQ_FLUSH              (1 << __REQ_FLUSH)
 #define REQ_IO_STAT            (1 << __REQ_IO_STAT)
 #define REQ_MIXED_MERGE                (1 << __REQ_MIXED_MERGE)
+#define REQ_SECURE             (1 << __REQ_SECURE)
 
 #endif /* __LINUX_BLK_TYPES_H */