| /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/trace/events/ |
| H A D | block.h | 32 __field( sector_t, sector ) 38 __entry->sector = bh->b_blocknr; 42 TP_printk("%d,%d sector=%llu size=%zu", 44 (unsigned long long)__entry->sector, __entry->size 91 __field( sector_t, sector ) 100 __entry->sector = blk_rq_trace_sector(rq); 111 (unsigned long long)__entry->sector, __entry->nr_sector, 126 __field( sector_t, sector ) 136 __entry->sector = blk_rq_pos(rq); 148 (unsigned long long)__entry->sector, __entr [all...] |
| 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/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 > in blkdev_do_report_zones() 261 blkdev_report_zones(struct block_device * bdev,sector_t sector,unsigned int nr_zones,report_zones_cb cb,void * data) blkdev_report_zones() argument 298 blkdev_zone_mgmt(struct block_device * bdev,enum req_op op,sector_t sector,sector_t nr_sectors) blkdev_zone_mgmt() argument 547 disk_get_hashed_zone_wplug(struct gendisk * disk,sector_t sector) disk_get_hashed_zone_wplug() argument 569 disk_get_zone_wplug(struct gendisk * disk,sector_t sector) disk_get_zone_wplug() argument 668 disk_get_or_alloc_zone_wplug(struct gendisk * disk,sector_t sector,gfp_t gfp_mask) disk_get_or_alloc_zone_wplug() argument 891 blkdev_report_zone_fallback(struct block_device * bdev,sector_t sector,struct blk_zone * zone) blkdev_report_zone_fallback() argument 936 blkdev_get_zone_info(struct block_device * bdev,sector_t sector,struct blk_zone * zone) blkdev_get_zone_info() argument 1043 blkdev_report_zones_cached(struct block_device * bdev,sector_t sector,unsigned int nr_zones,report_zones_cb cb,void * data) blkdev_report_zones_cached() argument 1089 sector_t sector = bio->bi_iter.bi_sector; blk_zone_reset_bio_endio() local 1117 sector_t sector; blk_zone_reset_all_bio_endio() local 1146 sector_t sector = bio->bi_iter.bi_sector; blk_zone_finish_bio_endio() local 1426 sector_t sector = bio->bi_iter.bi_sector; blk_zone_wplug_handle_write() local 2030 sector_t sector; global() member 2421 blk_zone_issue_zeroout(struct block_device * bdev,sector_t sector,sector_t nr_sects,gfp_t gfp_mask) blk_zone_issue_zeroout() argument [all...] |
| /linux/drivers/block/null_blk/ |
| H A D | zoned.c | 56 sector_t sector = 0; in null_init_zoned_dev() local 134 zone->start = sector; in null_init_zoned_dev() 141 sector += dev->zone_size_sects; in null_init_zoned_dev() 148 zone->start = sector; in null_init_zoned_dev() 164 sector += dev->zone_size_sects; in null_init_zoned_dev() 193 int null_report_zones(struct gendisk *disk, sector_t sector, in null_report_zones() argument 203 first_zone = null_zone_no(dev, sector); in null_report_zones() 241 sector_t sector, unsigned int len) in null_zone_valid_read_len() argument 244 struct nullb_zone *zone = &dev->zones[null_zone_no(dev, sector)]; in null_zone_valid_read_len() 249 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 900 static void null_free_sector(struct nullb *nullb, sector_t sector, in null_free_sector() argument 909 idx = sector >> PAGE_SECTORS_SHIFT; in null_free_sector() 910 sector_bit = (sector & SECTOR_MASK); in null_free_sector() 973 sector_t sector, bool for_write, bool is_cache) in __null_lookup_page() argument 980 idx = sector >> PAGE_SECTORS_SHIFT; in __null_lookup_page() 981 sector_bit = (sector & SECTOR_MASK); in __null_lookup_page() 994 sector_t sector, bool for_write, bool ignore_cache) in null_lookup_page() argument 999 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/Documentation/admin-guide/device-mapper/ |
| H A D | dm-integrity.rst | 6 per-sector tags that can be used for storing integrity information. 8 A general problem with storing integrity tags with every sector is that 9 writing the sector and the integrity tag must be atomic - i.e. in case of 10 crash, either both sector and integrity tag or none of them is written. 13 writes sector data and integrity tags into a journal, commits the journal 53 2. load the dm-integrity target with one-sector size, the kernel driver 67 2. the number of reserved sector at the beginning of the device - the 160 an attacker reading the journal could see the last sector numbers 161 that were written. From the sector numbers, the attacker can infer 166 Protect sector numbers in the journal from accidental or malicious [all …]
|
| 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/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/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 | 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 …]
|
| H A D | raid5.c | 431 (unsigned long long)sh->sector); in remove_hash() 438 struct hlist_head *hp = stripe_hash(conf, sh->sector); in insert_hash() 441 (unsigned long long)sh->sector); in insert_hash() 580 static void init_stripe(struct stripe_head *sh, sector_t sector, int previous) in init_stripe() argument 591 (unsigned long long)sector); in init_stripe() 596 sh->sector = sector; in init_stripe() 597 stripe_set_idx(sector, conf, previous, sh); in init_stripe() 605 pr_err("sector=%llx i=%d %p %p %p %p %d\n", in init_stripe() 606 (unsigned long long)sh->sector, in init_stripe() 622 __find_stripe(struct r5conf * conf,sector_t sector,short generation) __find_stripe() argument 636 find_get_stripe(struct r5conf * conf,sector_t sector,short generation,int hash) find_get_stripe() argument 808 raid5_get_active_stripe(struct r5conf * conf,struct stripe_request_ctx * ctx,sector_t sector,unsigned int flags) raid5_get_active_stripe() argument 1115 defer_issue_bios(struct r5conf * conf,sector_t sector,struct bio_list * bios) defer_issue_bios() argument 1363 async_copy_data(int frombio,struct bio * bio,struct page ** page,unsigned int poff,sector_t sector,struct dma_async_tx_descriptor * tx,struct stripe_head * sh,int no_skipcopy) async_copy_data() argument 3468 sector_t sector; stripe_bio_overlaps() local 3523 sector_t sector = sh->dev[dd_idx].sector; __add_stripe_bio() local 5339 sector_t sector = bio->bi_iter.bi_sector; in_chunk_boundary() local 5421 sector_t sector, end_sector; raid5_read_one_chunk() local 5494 sector_t sector = raid_bio->bi_iter.bi_sector; chunk_aligned_read() local 5772 ahead_of_reshape(struct mddev * mddev,sector_t sector,sector_t reshape_sector) ahead_of_reshape() argument 6065 sector_t sector; raid5_bio_lowest_chunk_sector() local 6620 sector_t sector, logical_sector, last_sector; retry_aligned_read() local [all...] |
| /linux/drivers/vdpa/vdpa_sim/ |
| H A D | vdpa_sim_blk.c | 84 "starting sector exceeds the capacity - start: 0x%llx capacity: 0x%x\n", in vdpasim_blk_check_range() 118 u64 sector; in vdpasim_blk_handle_req() local 156 sector = vdpasim64_to_cpu(vdpasim, hdr.sector); in vdpasim_blk_handle_req() 157 offset = sector << SECTOR_SHIFT; in vdpasim_blk_handle_req() 161 sector != 0) { in vdpasim_blk_handle_req() 163 "sector must be 0 for %u request - sector: 0x%llx\n", in vdpasim_blk_handle_req() 164 type, sector); in vdpasim_blk_handle_req() 171 if (!vdpasim_blk_check_range(vdpasim, sector, in vdpasim_blk_handle_req() [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/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/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 …]
|