diff options
Diffstat (limited to 'drivers/md/dm-bufio.c')
-rw-r--r-- | drivers/md/dm-bufio.c | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c index 089a7892bd5d..8f600e9cb8d3 100644 --- a/drivers/md/dm-bufio.c +++ b/drivers/md/dm-bufio.c @@ -259,9 +259,11 @@ static void buffer_record_stack(struct dm_buffer *b) } #endif -/*---------------------------------------------------------------- +/* + *---------------------------------------------------------------- * A red/black tree acts as an index for all the buffers. - *--------------------------------------------------------------*/ + *---------------------------------------------------------------- + */ static struct dm_buffer *__find(struct dm_bufio_client *c, sector_t block) { struct rb_node *n = c->buffer_tree.rb_node; @@ -562,7 +564,8 @@ static void __relink_lru(struct dm_buffer *b, int dirty) b->last_accessed = jiffies; } -/*---------------------------------------------------------------- +/* + *-------------------------------------------------------------------------- * Submit I/O on the buffer. * * Bio interface is faster but it has some problems: @@ -578,7 +581,8 @@ static void __relink_lru(struct dm_buffer *b, int dirty) * rejects the bio because it is too large, use dm-io layer to do the I/O. * The dm-io layer splits the I/O into multiple requests, avoiding the above * shortcomings. - *--------------------------------------------------------------*/ + *-------------------------------------------------------------------------- + */ /* * dm-io completion routine. It just calls b->bio.bi_end_io, pretending @@ -717,9 +721,11 @@ static void submit_io(struct dm_buffer *b, enum req_op op, use_dmio(b, op, sector, n_sectors, offset); } -/*---------------------------------------------------------------- +/* + *-------------------------------------------------------------- * Writing dirty buffers - *--------------------------------------------------------------*/ + *-------------------------------------------------------------- + */ /* * The endio routine for write. @@ -999,9 +1005,11 @@ static void __check_watermark(struct dm_bufio_client *c, __write_dirty_buffers_async(c, 1, write_list); } -/*---------------------------------------------------------------- +/* + *-------------------------------------------------------------- * Getting a buffer - *--------------------------------------------------------------*/ + *-------------------------------------------------------------- + */ static struct dm_buffer *__bufio_new(struct dm_bufio_client *c, sector_t block, enum new_flag nf, int *need_submit, @@ -2060,9 +2068,11 @@ static void work_fn(struct work_struct *w) DM_BUFIO_WORK_TIMER_SECS * HZ); } -/*---------------------------------------------------------------- +/* + *-------------------------------------------------------------- * Module setup - *--------------------------------------------------------------*/ + *-------------------------------------------------------------- + */ /* * This is called only once for the whole dm_bufio module. |