* [snitzer:dm-buffered 7/17] drivers/md/dm-buffered-target.c:453:2: warning: label at end of compound statement is a C2x extension
@ 2024-04-14 20:55 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-04-14 20:55 UTC (permalink / raw)
To: Heinz Mauelshagen; +Cc: llvm, oe-kbuild-all, Mike Snitzer
tree: https://git.kernel.org/pub/scm/linux/kernel/git/snitzer/linux.git dm-buffered
head: 28cac58f710bee429b166b4afb5a6450f88ba036
commit: 92101d4f7a11082735b25b2f473fb6804f519460 [7/17] dm buffered: test target buffering all I/O through dm-bufio
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20240415/202404150402.CMiozTNP-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240415/202404150402.CMiozTNP-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202404150402.CMiozTNP-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/md/dm-buffered-target.c:453:2: warning: label at end of compound statement is a C2x extension [-Wc2x-extensions]
453 | }
| ^
1 warning generated.
vim +453 drivers/md/dm-buffered-target.c
408
409 /* Process I/O on a bio prefetching buffers on a single @bio in a worker. */
410 static void _process_bio(struct work_struct *work)
411 {
412 struct buffered_c *bc = container_of(work, struct buffered_c, buffered_ws);
413 struct bio *bio;
414 bool queue, write;
415 sector_t blocks, sectors, start, end;
416
417 spin_lock(&bc->lock);
418 bio = bio_list_pop(&bc->bios);
419 spin_unlock(&bc->lock);
420
421 if (!bio)
422 return;
423
424 write = false;
425 start = _to_block(bc, bio->bi_iter.bi_sector);
426
427 /* Prefetch read and partial write buffers */
428 switch (bio_op(bio)) {
429 case REQ_OP_READ:
430 sectors = bio_end_sector(bio) - _to_sector(bc, start);
431 blocks = _to_block(bc, sectors) + _sector_mod(bc, sectors) ? 1 : 0;
432 dm_bufio_prefetch(bc->bufio, start, blocks);
433 break;
434 case REQ_OP_WRITE:
435 write = true;
436 /* Beware of partial block updates. */
437 if (_sector_mod(bc, bio->bi_iter.bi_sector)) {
438 dm_bufio_prefetch(bc->bufio, start, 1);
439 atomic_inc(&bc->stats[S_PREFETCHED_WRITES]);
440 }
441 if (_sector_mod(bc, bio_end_sector(bio))) {
442 end = _to_block(bc, bio_end_sector(bio));
443 if (start != end) {
444 dm_bufio_prefetch(bc->bufio, start, 1);
445 atomic_inc(&bc->stats[S_PREFETCHED_WRITES]);
446 }
447 }
448 break;
449 case REQ_OP_WRITE_ZEROES:
450 write = true;
451 break;
452 default:
> 453 }
454
455 __process_bio(bc, bio);
456
457 /* Use spinlock here also as in map function to avoid any memory access reordering issues. */
458 spin_lock(&bc->lock);
459 queue = !bio_list_empty(&bc->bios);
460 spin_unlock(&bc->lock);
461
462 if (queue)
463 queue_work(bc->buffered_wq, &bc->buffered_ws);
464
465 /* Reschedule the flush thread in case of new write(s). */
466 if (write)
467 schedule_delayed_work(&bc->buffered_flush_ws, 2 * HZ);
468
469 cond_resched();
470 }
471
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-04-14 20:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-14 20:55 [snitzer:dm-buffered 7/17] drivers/md/dm-buffered-target.c:453:2: warning: label at end of compound statement is a C2x extension kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.