Skip to content

Commit

Permalink
Merge tag 'md-6.11-20240612' of git://git.kernel.org/pub/scm/linux/ke…
Browse files Browse the repository at this point in the history
…rnel/git/song/md into for-6.11/block

Pull MD updates from Song:

"The major changes in this PR are:

 - sync_action fix and refactoring, by Yu Kuai;
 - Various small fixes by Christoph Hellwig, Li Nan, and Ofir Gal."

* tag 'md-6.11-20240612' of git://git.kernel.org/pub/scm/linux/kernel/git/song/md:
  md/raid5: avoid BUG_ON() while continue reshape after reassembling
  md: pass in max_sectors for pers->sync_request()
  md: factor out helpers for different sync_action in md_do_sync()
  md: replace last_sync_action with new enum type
  md: use new helpers in md_do_sync()
  md: don't fail action_store() if sync_thread is not registered
  md: remove parameter check_seq for stop_sync_thread()
  md: replace sysfs api sync_action with new helpers
  md: factor out helper to start reshape from action_store()
  md: add new helpers for sync_action
  md: add a new enum type sync_action
  md: rearrange recovery_flags
  md/md-bitmap: fix writing non bitmap pages
  md/raid1: don't free conf on raid0_run failure
  md/raid0: don't free conf on raid0_run failure
  md: make md_flush_request() more readable
  md: fix deadlock between mddev_suspend and flush bio
  md: change the return value type of md_write_start to void
  md: do not delete safemode_timer in mddev_suspend
  • Loading branch information
axboe committed Jun 12, 2024
2 parents 83a7eef + 305a517 commit c2670cf
Show file tree
Hide file tree
Showing 8 changed files with 435 additions and 285 deletions.
2 changes: 1 addition & 1 deletion drivers/md/dm-raid.c
Original file line number Diff line number Diff line change
Expand Up @@ -3542,7 +3542,7 @@ static void raid_status(struct dm_target *ti, status_type_t type,
recovery = rs->md.recovery;
state = decipher_sync_action(mddev, recovery);
progress = rs_get_progress(rs, recovery, state, resync_max_sectors);
resync_mismatches = (mddev->last_sync_action && !strcasecmp(mddev->last_sync_action, "check")) ?
resync_mismatches = mddev->last_sync_action == ACTION_CHECK ?
atomic64_read(&mddev->resync_mismatches) : 0;

/* HM FIXME: do we want another state char for raid0? It shows 'D'/'A'/'-' now */
Expand Down
6 changes: 3 additions & 3 deletions drivers/md/md-bitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,8 @@ static int __write_sb_page(struct md_rdev *rdev, struct bitmap *bitmap,
struct block_device *bdev;
struct mddev *mddev = bitmap->mddev;
struct bitmap_storage *store = &bitmap->storage;
unsigned int bitmap_limit = (bitmap->storage.file_pages - pg_index) <<
PAGE_SHIFT;
loff_t sboff, offset = mddev->bitmap_info.offset;
sector_t ps = pg_index * PAGE_SIZE / SECTOR_SIZE;
unsigned int size = PAGE_SIZE;
Expand Down Expand Up @@ -269,11 +271,9 @@ static int __write_sb_page(struct md_rdev *rdev, struct bitmap *bitmap,
if (size == 0)
/* bitmap runs in to data */
return -EINVAL;
} else {
/* DATA METADATA BITMAP - no problems */
}

md_super_write(mddev, rdev, sboff + ps, (int) size, page);
md_super_write(mddev, rdev, sboff + ps, (int)min(size, bitmap_limit), page);
return 0;
}

Expand Down
Loading

0 comments on commit c2670cf

Please sign in to comment.