| /linux/drivers/block/drbd/ |
| H A D | drbd_interval.c | 16 #define NODE_END(node) ((node)->sector + ((node)->size >> 9)) 28 sector_t this_end = this->sector + (this->size >> 9); in drbd_insert_interval() 39 if (this->sector < here->sector) in drbd_insert_interval() 41 else if (this->sector > here->sector) in drbd_insert_interval() 60 * @sector: start sector of @interval 63 * Returns if the tree contains the node @interval with start sector @start. 66 * sector number. 69 drbd_contains_interval(struct rb_root *root, sector_t sector, in drbd_contains_interval() argument 78 if (sector < here->sector) in drbd_contains_interval() 80 else if (sector > here->sector) in drbd_contains_interval() [all …]
|
| H A D | drbd_actlog.c | 127 sector_t sector, enum req_op op) in _drbd_md_sync_page_io() argument 144 bio->bi_iter.bi_sector = sector; in _drbd_md_sync_page_io() 178 sector_t sector, enum req_op op) in drbd_md_sync_page_io() argument 187 (unsigned long long)sector, (op == REQ_OP_WRITE) ? "WRITE" : "READ", in drbd_md_sync_page_io() 190 if (sector < drbd_md_first_sector(bdev) || in drbd_md_sync_page_io() 191 sector + 7 > drbd_md_last_sector(bdev)) in drbd_md_sync_page_io() 194 (unsigned long long)sector, in drbd_md_sync_page_io() 197 err = _drbd_md_sync_page_io(device, bdev, sector, op); in drbd_md_sync_page_io() 200 (unsigned long long)sector, in drbd_md_sync_page_io() 245 unsigned first = i->sector >> (AL_EXTENT_SHIFT-9); in drbd_al_begin_io_fastpath() [all …]
|
| H A D | drbd_interval.h | 10 sector_t sector; /* start sector of the interval */ member 41 #define drbd_for_each_overlap(i, root, sector, size) \ argument 42 for (i = drbd_find_overlap(root, sector, size); \ 44 i = drbd_next_overlap(i, sector, size))
|
| H A D | drbd_worker.c | 127 drbd_set_out_of_sync(peer_device, peer_req->i.sector, peer_req->i.size); in drbd_endio_write_sec_final() 157 drbd_rs_complete_io(device, i.sector); in drbd_endio_write_sec_final() 183 (unsigned long long)peer_req->i.sector); in drbd_peer_request_endio() 356 sector_t sector = peer_req->i.sector; in w_e_send_csum() local 367 err = drbd_send_drequest_csum(peer_device, sector, size, in w_e_send_csum() 387 static int read_for_csum(struct drbd_peer_device *peer_device, sector_t sector, int size) in read_for_csum() argument 397 peer_req = drbd_alloc_peer_req(peer_device, ID_SYNCER /* unused */, sector, in read_for_csum() 591 sector_t sector; in make_resync_request() local 657 sector = BM_BIT_TO_SECT(bit); in make_resync_request() 659 if (drbd_try_rs_begin_io(peer_device, sector)) { in make_resync_request() [all …]
|
| H A D | drbd_receiver.c | 177 drbd_alloc_peer_req(struct drbd_peer_device *peer_device, u64 id, sector_t sector, in drbd_alloc_peer_req() argument 208 peer_req->i.sector = sector; in drbd_alloc_peer_req() 1336 /* Zero-sector (unknown) and one-sector granularities are the same. */ in drbd_issue_discard_or_zero_out() 1414 if (drbd_issue_discard_or_zero_out(device, peer_req->i.sector, in drbd_issue_peer_discard_or_zero_out() 1452 sector_t sector = peer_req->i.sector; in drbd_submit_peer_request() local 1505 /* > peer_req->i.sector, unless this is the first bio */ in drbd_submit_peer_request() 1506 bio->bi_iter.bi_sector = sector; in drbd_submit_peer_request() 1519 sector += len >> 9; in drbd_submit_peer_request() 1659 read_in_block(struct drbd_peer_device *peer_device, u64 id, sector_t sector, in read_in_block() argument 1709 if (sector + (ds>>9) > capacity) { in read_in_block() [all …]
|
| /linux/include/uapi/linux/ |
| H A D | blkzoned.h | 111 * @start: Zone start in 512 B sector units 112 * @len: Zone length in 512 B sector units 113 * @wp: Zone write pointer location in 512 B sector units 120 * @capacity: Zone usable capacity in 512 B sector units 124 * start, len, capacity and wp use the regular 512 B sector unit, regardless 130 __u64 start; /* Zone start sector */ 145 * @sector: starting sector of report 157 __u64 sector; member 167 * @sector: Starting sector of the first zone to operate on. 171 __u64 sector; member [all …]
|
| /linux/block/ |
| H A D | blk-zoned.c | 161 static void disk_zone_set_cond(struct gendisk *disk, sector_t sector, in disk_zone_set_cond() argument 169 unsigned int zno = disk_zone_no(disk, sector); in disk_zone_set_cond() 190 * bdev_zone_is_seq - check if a sector belongs to a sequential write zone 192 * @sector: sector number 194 * Check if @sector on @bdev is contained in a sequential write required zone. 196 bool bdev_zone_is_seq(struct block_device *bdev, sector_t sector) in bdev_zone_is_seq() argument 199 unsigned int zno = disk_zone_no(disk, sector); in bdev_zone_is_seq() 227 static int blkdev_do_report_zones(struct block_device *bdev, sector_t sector, in blkdev_do_report_zones() argument 236 if (!nr_zones || sector >= get_capacity(disk)) in blkdev_do_report_zones() 239 return disk->fops->report_zones(disk, sector, nr_zones, args); in blkdev_do_report_zones() [all …]
|
| /linux/drivers/block/null_blk/ |
| H A D | zoned.c | 58 sector_t sector = 0; in null_init_zoned_dev() local 140 zone->start = sector; in null_init_zoned_dev() 147 sector += dev->zone_size_sects; in null_init_zoned_dev() 154 zone->start = sector; in null_init_zoned_dev() 170 sector += dev->zone_size_sects; in null_init_zoned_dev() 199 int null_report_zones(struct gendisk *disk, sector_t sector, in null_report_zones() argument 209 first_zone = null_zone_no(dev, sector); in null_report_zones() 247 sector_t sector, unsigned int len) in null_zone_valid_read_len() argument 250 struct nullb_zone *zone = &dev->zones[null_zone_no(dev, sector)]; in null_zone_valid_read_len() 255 sector + nr_sectors <= zone->wp) in null_zone_valid_read_len() [all …]
|
| H A D | main.c | 53 * @bitmap: The bitmap represents which sector in the page has data. 54 * Each bit represents one block size. For example, sector 8 908 static void null_free_sector(struct nullb *nullb, sector_t sector, in null_free_sector() argument 917 idx = sector >> PAGE_SECTORS_SHIFT; in null_free_sector() 918 sector_bit = (sector & SECTOR_MASK); in null_free_sector() 981 sector_t sector, bool for_write, bool is_cache) in __null_lookup_page() argument 988 idx = sector >> PAGE_SECTORS_SHIFT; in __null_lookup_page() 989 sector_bit = (sector & SECTOR_MASK); in __null_lookup_page() 1002 sector_t sector, bool for_write, bool ignore_cache) in null_lookup_page() argument 1007 page = __null_lookup_page(nullb, sector, for_write, true); in null_lookup_page() [all …]
|
| /linux/fs/hpfs/ |
| H A D | hpfs.h | 29 typedef u32 secno; /* sector number, partition relative */ 31 typedef secno dnode_secno; /* sector number of a dnode */ 32 typedef secno fnode_secno; /* sector number of an fnode */ 33 typedef secno anode_secno; /* sector number of an anode */ 37 /* sector 0 */ 71 /* sector 16 */ 96 __le32 dir_band_start; /* first sector in dir band */ 97 __le32 dir_band_end; /* last sector in dir band */ 105 /* sector 17 */ 120 u8 bad_sector: 1; /* bad sector, corrupted disk (???) */ [all …]
|
| /linux/drivers/scsi/ |
| H A D | sr_vendor.c | 25 * Some XA-Sector tweaking, required for older drives. 90 is followed by a read for the same sector - aeb */ in sr_vendor_init() 174 unsigned long sector; in sr_cd_check() local 186 sector = 0; /* the multisession sector offset goes here */ in sr_cd_check() 212 sector = buffer[11] + (buffer[10] << 8) + in sr_cd_check() 215 /* ignore sector offsets from first track */ in sr_cd_check() 216 sector = 0; in sr_cd_check() 243 sector = min * CD_SECS * CD_FRAMES + sec * CD_FRAMES + frame; in sr_cd_check() 271 sector = min * CD_SECS * CD_FRAMES + sec * CD_FRAMES + frame; in sr_cd_check() 272 if (sector) in sr_cd_check() [all …]
|
| /linux/drivers/mtd/ |
| H A D | rfd_ftl.c | 47 /* next is an array of mapping for each corresponding sector */ 79 u_int header_size; /* bytes in header sector */ 91 static int rfd_ftl_writesect(struct mtd_blktrans_dev *dev, u_long sector, char *buf); 126 "sector %d out of range\n", in build_block_map() 133 "'%s': more than one entry for sector %d\n", in build_block_map() 239 static int rfd_ftl_readsect(struct mtd_blktrans_dev *dev, u_long sector, char *buf) in rfd_ftl_readsect() argument 246 if (sector >= part->sector_count) in rfd_ftl_readsect() 249 addr = part->sector_map[sector]; in rfd_ftl_readsect() 383 "read sector for relocation\n", in move_block_contents() 428 * Postpone reclaiming if there is a free sector as in reclaim_block() [all …]
|
| /linux/include/trace/events/ |
| H A D | bcache.h | 18 __field(sector_t, sector ) 28 __entry->sector = bio->bi_iter.bi_sector; 36 __entry->rwbs, (unsigned long long)__entry->sector, 96 __field(sector_t, sector ) 103 __entry->sector = bio->bi_iter.bi_sector; 110 (unsigned long long)__entry->sector, __entry->nr_sector) 129 __field(sector_t, sector ) 138 __entry->sector = bio->bi_iter.bi_sector; 147 __entry->rwbs, (unsigned long long)__entry->sector, 159 __field(sector_t, sector ) [all …]
|
| /linux/drivers/md/ |
| H A D | dm-log-writes.c | 72 * [ 1 sector ][ entry->nr_sectors ] 75 * The log_write_entry takes up a full sector so we can have arbitrary length 90 * sector - the sector we wrote. 97 __le64 sector; member 126 sector_t sector; member 214 sector_t sector) in write_metadata() argument 223 bio->bi_iter.bi_sector = sector; in write_metadata() 224 bio->bi_end_io = (sector == WRITE_LOG_SUPER_SECTOR) ? in write_metadata() 260 sector_t sector) in write_inline_data() argument 276 bio->bi_iter.bi_sector = sector; in write_inline_data() [all …]
|
| H A D | raid0.c | 135 * now since we have the hard sector sizes, we can make sure in create_strip_zones() 136 * chunk size is a multiple of that sector size in create_strip_zones() 310 sector_t sector = *sectorp; in find_zone() local 313 if (sector < z[i].zone_end) { in find_zone() 315 *sectorp = sector - z[i-1].zone_end; in find_zone() 326 sector_t sector, sector_t *sector_offset) in map_sector() argument 336 /* find the sector offset inside the chunk */ in map_sector() 337 sect_in_chunk = sector & (chunk_sects - 1); in map_sector() 338 sector >>= chunksect_bits; in map_sector() 344 sect_in_chunk = sector_div(sector, chunk_sects); in map_sector() [all …]
|
| H A D | raid5-ppl.c | 40 * sh->sector dd0 dd1 dd2 ppl 48 * data_sector is the first raid sector of the modified data, data_size is the 166 pr_debug("%s: stripe %llu\n", __func__, (unsigned long long)sh->sector); in ops_run_partial_parity() 277 pr_debug("%s: stripe: %llu\n", __func__, (unsigned long long)sh->sector); in ppl_log_stripe() 303 if (!data_disks || dev->sector < data_sector) in ppl_log_stripe() 304 data_sector = dev->sector; in ppl_log_stripe() 328 if ((sh->sector == sh_last->sector + RAID5_STRIPE_SECTORS(conf)) && in ppl_log_stripe() 420 pr_debug("%s: seq: %llu size: %u sector: %llu dev: %pg\n", in ppl_submit_iounit_bio() 461 log->rdev->ppl.sector + log->rdev->ppl.size - log->next_io_sector < in ppl_submit_iounit() 463 log->next_io_sector = log->rdev->ppl.sector; in ppl_submit_iounit() [all …]
|
| /linux/fs/btrfs/ |
| H A D | raid56.h | 44 * If there is a bio covering a sector (one btrfs fs block), the corresponding 48 * If there is no bio covering a sector, then btrfs_raid_bio::bio_paddrs[i] will 75 * [LOCATING A SECTOR] 76 * To locate a sector for IO, we need the following info: 83 * Starts from 0 (representing the first sector of the stripe), ends 89 * Starts from 0 (representing the first step of the sector), ends 103 * normally meaning there is no page allocated for the specified sector. 163 * How many steps there are for one sector. 209 /* Each set bit means the corresponding sector in stripe_sectors[] is uptodate. */ 217 * Each bit is corresponding to one sector in either bio_sectors[] or [all …]
|
| /linux/drivers/block/ |
| H A D | brd.c | 47 * Look up and return a brd's page with reference grabbed for a given sector. 49 static struct page *brd_lookup_page(struct brd_device *brd, sector_t sector) in brd_lookup_page() argument 52 XA_STATE(xas, &brd->brd_pages, sector >> PAGE_SECTORS_SHIFT); in brd_lookup_page() 82 * Insert a new page for a given sector, if one does not already exist. 85 static struct page *brd_insert_page(struct brd_device *brd, sector_t sector, in brd_insert_page() argument 96 ret = __xa_cmpxchg(&brd->brd_pages, sector >> PAGE_SECTORS_SHIFT, NULL, in brd_insert_page() 141 sector_t sector = bio->bi_iter.bi_sector; in brd_rw_bvec() local 142 u32 offset = (sector & (PAGE_SECTORS - 1)) << SECTOR_SHIFT; in brd_rw_bvec() 149 page = brd_lookup_page(brd, sector); in brd_rw_bvec() 151 page = brd_insert_page(brd, sector, opf); in brd_rw_bvec() [all …]
|
| /linux/tools/testing/selftests/ublk/trace/ |
| H A D | seq_io.bt | 24 $expected = @start_order[args.sector]; 30 printf("out_of_order: sector %llu started at seq %llu but completed at seq %llu\n", 31 args.sector, $expected, @complete_seq); 34 delete(@start_order[args.sector]); 42 @start_order[args.sector] = @start_seq;
|
| /linux/Documentation/admin-guide/device-mapper/ |
| H A D | dm-crypt.rst | 78 then sectors are encrypted according to their offsets (sector 0 uses key0; 79 sector 1 uses key1 etc.). <keycount> must be a power of two. 82 The IV offset is a sector count that is added to the sector number 91 Starting sector within the device where the encrypted data begins. 138 The device requires additional <bytes> metadata per-sector stored 157 Virtual device will announce this size as a minimal IO and logical sector. 160 IV generators will use sector number counted in <sector_size> units 164 sector will be 8 (without flag) and 1 if iv_large_sectors is present.
|
| H A D | dm-dust.rst | 22 This emulates the "remapped sector" behavior of a drive with bad 286 specified sector (sector 0x1234, hardcoded in the source code), but 293 When a bad sector occurs on a hard disk drive, reads to that sector 296 the sector may succeed, and result in the sector becoming readable 298 sector (or after a reallocation of the sector). However, there may 303 of a bad sector at a known sector location, at a known time, based
|
| /linux/include/linux/ |
| H A D | blkdev.h | 224 * Independent sector access ranges. This is always NULL for 449 int blkdev_get_zone_info(struct block_device *bdev, sector_t sector, 453 int blkdev_report_zones(struct block_device *bdev, sector_t sector, 455 int blkdev_report_zones_cached(struct block_device *bdev, sector_t sector, 469 * and must include all sectors within the disk capacity (no sector holes 477 sector_t sector; member 756 static inline unsigned int disk_zone_no(struct gendisk *disk, sector_t sector) in disk_zone_no() argument 760 return sector >> ilog2(disk->queue->limits.chunk_sectors); in disk_zone_no() 926 * disk_zone_capacity - returns the zone capacity of zone containing @sector 928 * @sector: sector number within the querying zone [all …]
|
| /linux/drivers/char/ |
| H A D | ps3flash.c | 27 int tag; /* Start sector of buffer, -1 if invalid */ 98 u64 size, sector, offset; in ps3flash_read() local 118 sector = *pos / dev->bounce_size * priv->chunk_sectors; in ps3flash_read() 128 res = ps3flash_fetch(dev, sector); in ps3flash_read() 151 sector += priv->chunk_sectors; in ps3flash_read() 167 u64 size, sector, offset; in ps3flash_write() local 187 sector = *pos / dev->bounce_size * priv->chunk_sectors; in ps3flash_write() 198 res = ps3flash_fetch(dev, sector); in ps3flash_write() 199 else if (sector != priv->tag) in ps3flash_write() 219 priv->tag = sector; in ps3flash_write() [all …]
|
| /linux/drivers/usb/storage/ |
| H A D | jumpshot.c | 96 unsigned long sectors; /* total sector count */ 97 unsigned long ssize; /* sector size in bytes */ 155 u32 sector, in jumpshot_read_data() argument 171 if (sector > 0x0FFFFFFF) in jumpshot_read_data() 193 command[2] = sector & 0xFF; in jumpshot_read_data() 194 command[3] = (sector >> 8) & 0xFF; in jumpshot_read_data() 195 command[4] = (sector >> 16) & 0xFF; in jumpshot_read_data() 197 command[5] = 0xE0 | ((sector >> 24) & 0x0F); in jumpshot_read_data() 217 sector += thistime; in jumpshot_read_data() 232 u32 sector, in jumpshot_write_data() argument [all …]
|
| /linux/samples/bpf/ |
| H A D | tracex3.bpf.c | 15 sector_t sector; member 32 .sector = ctx->sector in bpf_prog1() 63 .sector = ctx->sector in bpf_prog2()
|