Skip to contentSkip to conversation

zbd random read conventional zones

PATCH In review [email protected] 3 participants 3 messages Apr 24, 2019 – Apr 25, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 zbd random read conventional zones

From: Phillip Chen <[email protected]>

Initialize conventional zone write pointers to full so zbd_find_zone will accept conventional zones when searching around a randomly chosen empty zone.

---
 zbd.c | 2 --
 1 file changed, 2 deletions(-)
zbd.c +0 -2
index 2da742b7..616c3e0e 100644
@@ -418,8 +418,6 @@ static int parse_zone_info(struct thread_data *td, struct fio_file *f)
 			p->start = z->start << 9;
 			switch (z->cond) {
 			case BLK_ZONE_COND_NOT_WP:
-				p->wp = p->start;
-				break;
 			case BLK_ZONE_COND_FULL:
 				p->wp = p->start + zone_size;
 				break;
Signature · 1 line
2.21.0
Reviewed-by on v1 1/1
#1 lore raw

Phillip,

Quoted 6 lines · On 2019/04/24 14:48, [email protected] wrote:

From: Phillip Chen <[email protected]>

Initialize conventional zone write pointers to full so zbd_find_zone will accept conventional zones when searching around a randomly chosen empty zone.

A patch format is generally:

component: title (what is the patch)

description

Signed-of-by: ...

So in your case, the patch should probably be something like:

zbd: Fix zone selection

Initialize conventional zone write pointers to full so zbd_find_zone() will accept conventional zones under random reads/write workloads.

Quoted 11 lines
---
 zbd.c | 2 --
 1 file changed, 2 deletions(-)
zbd.c +0 -0
index 2da742b7..616c3e0e 100644

zbd.c static int parse_zone_info(struct thread_data *td, struct fio_file *f) · line 423

Quoted 8 lines
zbd.c +0 -2
@@ -418,8 +418,6 @@ static int parse_zone_info(struct thread_data *td, struct fio_file *f)
 			p->start = z->start << 9;
 			switch (z->cond) {
 			case BLK_ZONE_COND_NOT_WP:
-				p->wp = p->start;
-				break;
 			case BLK_ZONE_COND_FULL:
 				p->wp = p->start + zone_size;
 				break;

Other than that, the code seems fine, so:

Signature · 2 lines
Damien Le Moal
Western Digital Research