diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2021-11-23 20:00:34 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:17 -0400 |
commit | 7279c1a24c3dd523b5824aaf24cee9e2a55c76f0 (patch) | |
tree | 03fce38b92087dc110b008bfd7d223f95f8b8dd6 /fs | |
parent | 084d42bbd67c5b2de607f56a94c7295459b16b61 (diff) | |
download | linux-stable-7279c1a24c3dd523b5824aaf24cee9e2a55c76f0.tar.gz linux-stable-7279c1a24c3dd523b5824aaf24cee9e2a55c76f0.tar.bz2 linux-stable-7279c1a24c3dd523b5824aaf24cee9e2a55c76f0.zip |
bcachefs: Kill PAGE_SECTOR_SHIFT
Replace it with the new, standard PAGE_SECTORS_SHIFT
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/bcachefs/fs-io.c | 12 | ||||
-rw-r--r-- | fs/bcachefs/util.h | 2 |
2 files changed, 6 insertions, 8 deletions
diff --git a/fs/bcachefs/fs-io.c b/fs/bcachefs/fs-io.c index b36685ebba69..16edd60f9b78 100644 --- a/fs/bcachefs/fs-io.c +++ b/fs/bcachefs/fs-io.c @@ -752,7 +752,7 @@ static void readpage_bio_extend(struct readpages_iter *iter, { while (bio_sectors(bio) < sectors_this_extent && bio->bi_vcnt < bio->bi_max_vecs) { - pgoff_t page_offset = bio_end_sector(bio) >> PAGE_SECTOR_SHIFT; + pgoff_t page_offset = bio_end_sector(bio) >> PAGE_SECTORS_SHIFT; struct page *page = readpage_iter_next(iter); int ret; @@ -932,7 +932,7 @@ void bch2_readahead(struct readahead_control *ractl) readpages_iter.idx++; - rbio->bio.bi_iter.bi_sector = (sector_t) index << PAGE_SECTOR_SHIFT; + rbio->bio.bi_iter.bi_sector = (sector_t) index << PAGE_SECTORS_SHIFT; rbio->bio.bi_end_io = bch2_readpages_end_io; BUG_ON(!bio_add_page(&rbio->bio, page, PAGE_SIZE, 0)); @@ -955,7 +955,7 @@ static void __bchfs_readpage(struct bch_fs *c, struct bch_read_bio *rbio, rbio->bio.bi_opf = REQ_OP_READ|REQ_SYNC; rbio->bio.bi_iter.bi_sector = - (sector_t) page->index << PAGE_SECTOR_SHIFT; + (sector_t) page->index << PAGE_SECTORS_SHIFT; BUG_ON(!bio_add_page(&rbio->bio, page, PAGE_SIZE, 0)); bch2_trans_init(&trans, c, 0, 0); @@ -1231,7 +1231,7 @@ do_io: } BUG_ON(!sectors); - sector = ((u64) page->index << PAGE_SECTOR_SHIFT) + offset; + sector = ((u64) page->index << PAGE_SECTORS_SHIFT) + offset; if (w->io && (w->io->op.res.nr_replicas != nr_replicas_this_write || @@ -2287,8 +2287,8 @@ static int __bch2_truncate_page(struct bch_inode_info *inode, * page */ ret = range_has_data(c, inode->ei_subvol, - POS(inode->v.i_ino, index << PAGE_SECTOR_SHIFT), - POS(inode->v.i_ino, (index + 1) << PAGE_SECTOR_SHIFT)); + POS(inode->v.i_ino, index << PAGE_SECTORS_SHIFT), + POS(inode->v.i_ino, (index + 1) << PAGE_SECTORS_SHIFT)); if (ret <= 0) return ret; diff --git a/fs/bcachefs/util.h b/fs/bcachefs/util.h index 41dfc5867c9e..969139fef086 100644 --- a/fs/bcachefs/util.h +++ b/fs/bcachefs/util.h @@ -18,8 +18,6 @@ #include <linux/vmalloc.h> #include <linux/workqueue.h> -#define PAGE_SECTOR_SHIFT (PAGE_SHIFT - 9) - struct closure; #ifdef CONFIG_BCACHEFS_DEBUG |