[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <878w8q5zg1.fsf@openvz.org>
Date: Wed, 14 Apr 2010 10:18:54 +0400
From: Dmitry Monakhov <dmonakhov@...nvz.org>
To: Christoph Hellwig <hch@...radead.org>
Cc: linux-kernel@...r.kernel.org, jens.axboe@...cle.com
Subject: Re: [PATCH 1/4] blkdev: pass gfp_mask and flags to blkdev_issue_flush
Christoph Hellwig <hch@...radead.org> writes:
>> +enum{
>> + __BLKDEV_IFL_WAIT, /* wait for completion */
>> + __BLKDEV_IFL_BARRIER, /*issue request with barrier */
>> +};
>> +#define BLKDEV_IFL_WAIT (1 << __BLKDEV_IFL_WAIT)
>> +#define BLKDEV_IFL_BARRIER (1 << __BLKDEV_IFL_BARRIER)
>
> This is a very awkward stayle to define flags. There really should
> be no need for the __-prefixed version. While you're using them for
> test/set_bit and co there's no reason to use these atomic bitops here.
I need both bit_num(used inside function) and flag (1<<bit_num)
which is used by function caller.
No problem, i'll change it whenever you like
do you like following?
enum{
IFN_BLKDEV_WAIT, /* wait for completion */
IFN_BLKDEV_BARRIER, /*issue request with barrier */
};
#define BLKDEV_WAIT (1 << IFN_BLKDEV_WAIT)
#define BLKDEV_BARRIER (1 << IFN_BLKDEV_BARRIER)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists