@@ -467,7 +467,6 @@ static void ppl_submit_iounit(struct ppl_io_unit *io)
467467 bio_set_dev (bio , log -> rdev -> bdev );
468468 bio -> bi_iter .bi_sector = log -> next_io_sector ;
469469 bio_add_page (bio , io -> header_page , PAGE_SIZE , 0 );
470- bio -> bi_write_hint = ppl_conf -> write_hint ;
471470
472471 pr_debug ("%s: log->current_io_sector: %llu\n" , __func__ ,
473472 (unsigned long long )log -> next_io_sector );
@@ -497,7 +496,6 @@ static void ppl_submit_iounit(struct ppl_io_unit *io)
497496 bio = bio_alloc_bioset (prev -> bi_bdev , BIO_MAX_VECS ,
498497 prev -> bi_opf , GFP_NOIO ,
499498 & ppl_conf -> bs );
500- bio -> bi_write_hint = prev -> bi_write_hint ;
501499 bio -> bi_iter .bi_sector = bio_end_sector (prev );
502500 bio_add_page (bio , sh -> ppl_page , PAGE_SIZE , 0 );
503501
@@ -1397,7 +1395,6 @@ int ppl_init_log(struct r5conf *conf)
13971395 atomic64_set (& ppl_conf -> seq , 0 );
13981396 INIT_LIST_HEAD (& ppl_conf -> no_mem_stripes );
13991397 spin_lock_init (& ppl_conf -> no_mem_stripes_lock );
1400- ppl_conf -> write_hint = RWH_WRITE_LIFE_NOT_SET ;
14011398
14021399 if (!mddev -> external ) {
14031400 ppl_conf -> signature = ~crc32c_le (~0 , mddev -> uuid , sizeof (mddev -> uuid ));
@@ -1496,25 +1493,13 @@ int ppl_modify_log(struct r5conf *conf, struct md_rdev *rdev, bool add)
14961493static ssize_t
14971494ppl_write_hint_show (struct mddev * mddev , char * buf )
14981495{
1499- size_t ret = 0 ;
1500- struct r5conf * conf ;
1501- struct ppl_conf * ppl_conf = NULL ;
1502-
1503- spin_lock (& mddev -> lock );
1504- conf = mddev -> private ;
1505- if (conf && raid5_has_ppl (conf ))
1506- ppl_conf = conf -> log_private ;
1507- ret = sprintf (buf , "%d\n" , ppl_conf ? ppl_conf -> write_hint : 0 );
1508- spin_unlock (& mddev -> lock );
1509-
1510- return ret ;
1496+ return sprintf (buf , "%d\n" , 0 );
15111497}
15121498
15131499static ssize_t
15141500ppl_write_hint_store (struct mddev * mddev , const char * page , size_t len )
15151501{
15161502 struct r5conf * conf ;
1517- struct ppl_conf * ppl_conf ;
15181503 int err = 0 ;
15191504 unsigned short new ;
15201505
@@ -1528,17 +1513,10 @@ ppl_write_hint_store(struct mddev *mddev, const char *page, size_t len)
15281513 return err ;
15291514
15301515 conf = mddev -> private ;
1531- if (!conf ) {
1516+ if (!conf )
15321517 err = - ENODEV ;
1533- } else if (raid5_has_ppl (conf )) {
1534- ppl_conf = conf -> log_private ;
1535- if (!ppl_conf )
1536- err = - EINVAL ;
1537- else
1538- ppl_conf -> write_hint = new ;
1539- } else {
1518+ else if (!raid5_has_ppl (conf ) || !conf -> log_private )
15401519 err = - EINVAL ;
1541- }
15421520
15431521 mddev_unlock (mddev );
15441522
0 commit comments