Hi Rohit,
> I was going through the submit_bh() code in fs/buffer.c
> (http://lxr.linux.no/source/fs/buffer.c#L2642). I was not
> able to trace the function definition of the call to
> buffer_ordered() (http://lxr.linux.no/source/fs/buffer.c#L2651)
> and clear_buffer_write_io_error()
> (http://lxr.linux.no/source/fs/buffer.c#L2659).
The answer lies in include/linux/buffer_head.h:
#define BUFFER_FNS(bit, name) \
static inline void set_buffer_##name(struct buffer_head *bh) \
{ \
set_bit(BH_##bit, &(bh)->b_state); \
} \
static inline void clear_buffer_##name(struct buffer_head *bh) \
{ \
clear_bit(BH_##bit, &(bh)->b_state); \
} \
static inline int buffer_##name(const struct buffer_head *bh) \
{ \
return test_bit(BH_##bit, &(bh)->b_state); \
}
The above macro helps in defining 3 functions (set_buffer_ordered() /
clear_buffer_ordered() / buffer_ordered()) in one go by a single line:
BUFFER_FNS(Ordered, ordered)
Similarly for BUFFER_FNS(Write_EIO, write_io_error).
Thanks,
Rajat
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ