lkml.org 
[lkml]   [2009]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] Fix discard requests accounting in the diskstats
    On Fri, 17 Apr 2009 11:44:49 +0530
    Nikanth Karthikesan <knikanth@suse.de> wrote:

    > --- a/include/linux/blkdev.h
    > +++ b/include/linux/blkdev.h
    > @@ -667,7 +667,9 @@ static inline void blk_clear_queue_full(struct request_queue *q, int sync)
    > (REQ_NOMERGE | REQ_STARTED | REQ_HARDBARRIER | REQ_SOFTBARRIER)
    > #define rq_mergeable(rq) \
    > (!((rq)->cmd_flags & RQ_NOMERGE_FLAGS) && \
    > - (blk_discard_rq(rq) || blk_fs_request((rq))))
    > + (blk_discard_rq(rq) || blk_fs_request(rq)))
    > +#define rq_accountable(rq) \
    > + (blk_discard_rq(rq) || blk_fs_request(rq))

    Both these macros reference their argument multiple times and are
    potentially buggy and/or inefficient if passed an expression with
    side-effects.

    There was (afaict) no reason for them to have been implemented as
    macros.



    \
     
     \ /
      Last update: 2009-04-23 22:01    [W:0.020 / U:30.432 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site