Skip to content

Commit ef99237

Browse files
shhuiwsnitm
authored andcommitted
dm bufio: update comment in dm-bufio.c
* Hashtable has been replaced by rbtree to manage buffers. Update the comment. * Fix typo in the comment for dm_bufio_issue_flush Signed-off-by: Shenghui Wang <shhuiw@foxmail.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
1 parent e8ea141 commit ef99237

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎drivers/md/dm-bufio.c‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565

6666
/*
6767
* Linking of buffers:
68-
* All buffers are linked to cache_hash with their hash_list field.
68+
* All buffers are linked to buffer_tree with their node field.
6969
*
7070
* Clean buffers that are not being written (B_WRITING not set)
7171
* are linked to lru[LIST_CLEAN] with their lru_list field.
@@ -457,7 +457,7 @@ static void free_buffer(struct dm_buffer *b)
457457
}
458458

459459
/*
460-
* Link buffer to the hash list and clean or dirty queue.
460+
* Link buffer to the buffer tree and clean or dirty queue.
461461
*/
462462
static void __link_buffer(struct dm_buffer *b, sector_t block, int dirty)
463463
{
@@ -472,7 +472,7 @@ static void __link_buffer(struct dm_buffer *b, sector_t block, int dirty)
472472
}
473473

474474
/*
475-
* Unlink buffer from the hash list and dirty or clean queue.
475+
* Unlink buffer from the buffer tree and dirty or clean queue.
476476
*/
477477
static void __unlink_buffer(struct dm_buffer *b)
478478
{
@@ -993,7 +993,7 @@ static struct dm_buffer *__bufio_new(struct dm_bufio_client *c, sector_t block,
993993

994994
/*
995995
* We've had a period where the mutex was unlocked, so need to
996-
* recheck the hash table.
996+
* recheck the buffer tree.
997997
*/
998998
b = __find(c, block);
999999
if (b) {
@@ -1327,7 +1327,7 @@ int dm_bufio_write_dirty_buffers(struct dm_bufio_client *c)
13271327
EXPORT_SYMBOL_GPL(dm_bufio_write_dirty_buffers);
13281328

13291329
/*
1330-
* Use dm-io to send and empty barrier flush the device.
1330+
* Use dm-io to send an empty barrier to flush the device.
13311331
*/
13321332
int dm_bufio_issue_flush(struct dm_bufio_client *c)
13331333
{
@@ -1356,7 +1356,7 @@ EXPORT_SYMBOL_GPL(dm_bufio_issue_flush);
13561356
* Then, we write the buffer to the original location if it was dirty.
13571357
*
13581358
* Then, if we are the only one who is holding the buffer, relink the buffer
1359-
* in the hash queue for the new location.
1359+
* in the buffer tree for the new location.
13601360
*
13611361
* If there was someone else holding the buffer, we write it to the new
13621362
* location but not relink it, because that other user needs to have the buffer

0 commit comments

Comments
 (0)