28 #include <linux/module.h>
30 #include <linux/slab.h>
203 #define RQ_LOCAL_PENDING (1UL << __RQ_LOCAL_PENDING)
204 #define RQ_LOCAL_COMPLETED (1UL << __RQ_LOCAL_COMPLETED)
205 #define RQ_LOCAL_OK (1UL << __RQ_LOCAL_OK)
206 #define RQ_LOCAL_ABORTED (1UL << __RQ_LOCAL_ABORTED)
208 #define RQ_LOCAL_MASK ((RQ_LOCAL_ABORTED << 1)-1)
210 #define RQ_NET_PENDING (1UL << __RQ_NET_PENDING)
211 #define RQ_NET_QUEUED (1UL << __RQ_NET_QUEUED)
212 #define RQ_NET_SENT (1UL << __RQ_NET_SENT)
213 #define RQ_NET_DONE (1UL << __RQ_NET_DONE)
214 #define RQ_NET_OK (1UL << __RQ_NET_OK)
215 #define RQ_NET_SIS (1UL << __RQ_NET_SIS)
218 #define RQ_NET_MASK (((1UL << __RQ_NET_MAX)-1) & ~RQ_LOCAL_MASK)
220 #define RQ_WRITE (1UL << __RQ_WRITE)
221 #define RQ_IN_ACT_LOG (1UL << __RQ_IN_ACT_LOG)
225 #define MR_WRITE_SHIFT 0
226 #define MR_WRITE (1 << MR_WRITE_SHIFT)
227 #define MR_READ_SHIFT 1
228 #define MR_READ (1 << MR_READ_SHIFT)
265 if ((
unsigned long)req == (
unsigned long)
id) {
273 static inline void drbd_req_make_private_bio(
struct drbd_request *req,
struct bio *bio_src)
280 bio->bi_private =
req;
291 drbd_req_make_private_bio(req, bio_src);
297 req->
sector = bio_src->bi_sector;
298 req->
size = bio_src->bi_size;
301 INIT_LIST_HEAD(&req->
w.list);
306 static inline void drbd_req_free(
struct drbd_request *req)
313 return !((s1 + (l1>>9) <= s2) || (s1 >= s2 + (l2>>9)));
363 spin_unlock_irqrestore(&mdev->
req_lock, flags);
371 static inline bool drbd_should_do_remote(
union drbd_state s)
381 static inline bool drbd_should_send_oos(
union drbd_state s)