/*
- * Copyright (c) 2000-2012 Apple Inc. All rights reserved.
+ * Copyright (c) 2000-2014 Apple Inc. All rights reserved.
*
* @APPLE_OSREFERENCE_LICENSE_HEADER_START@
*
#define BA_DELAYIDLESLEEP 0x00000004 /* Process is marked to delay idle sleep on disk IO */
#define BA_NOCACHE 0x00000008
#define BA_META 0x00000010
-#define BA_IO_TIER_MASK 0x00000f00
-#define BA_IO_TIER_SHIFT 8
#define BA_GREEDY_MODE 0x00000020 /* High speed writes that consume more storage */
#define BA_QUICK_COMPLETE 0x00000040 /* Request quick completion at expense of storage efficiency */
+#define BA_PASSIVE 0x00000080
+
+/*
+ * Note: IO_TIERs consume 0x0100, 0x0200, 0x0400, 0x0800
+ * These are now in-use by the I/O tiering system.
+ */
+#define BA_IO_TIER_MASK 0x00000f00
+#define BA_IO_TIER_SHIFT 8
+
+#define BA_ISOCHRONOUS 0x00001000 /* device specific isochronous throughput to media */
+
#define GET_BUFATTR_IO_TIER(bap) ((bap->ba_flags & BA_IO_TIER_MASK) >> BA_IO_TIER_SHIFT)
-#define SET_BUFATTR_IO_TIER(bap, tier) (bap->ba_flags |= ((tier << BA_IO_TIER_SHIFT) & BA_IO_TIER_MASK))
+#define SET_BUFATTR_IO_TIER(bap, tier) \
+do { \
+ (bap)->ba_flags &= (~BA_IO_TIER_MASK); \
+ (bap)->ba_flags |= (((tier) << BA_IO_TIER_SHIFT) & BA_IO_TIER_MASK); \
+} while(0)
extern int niobuf_headers; /* The number of IO buffer headers for cluster IO */
extern int nbuf_headers; /* The number of buffer headers */