/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 38 #define drbd_for_each_overlap(i, root, sector, size) \ argument 39 for (i = drbd_find_overlap(root, sector, size); \ 41 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() 590 sector_t sector; in make_resync_request() local 656 sector = BM_BIT_TO_SECT(bit); in make_resync_request() 658 if (drbd_try_rs_begin_io(peer_device, sector)) { in make_resync_request() [all …]
|
H A D | drbd_receiver.c | 360 drbd_alloc_peer_req(struct drbd_peer_device *peer_device, u64 id, sector_t sector, in drbd_alloc_peer_req() argument 389 peer_req->i.sector = sector; in drbd_alloc_peer_req() 1524 /* Zero-sector (unknown) and one-sector granularities are the same. */ in drbd_issue_discard_or_zero_out() 1602 if (drbd_issue_discard_or_zero_out(device, peer_req->i.sector, in drbd_issue_peer_discard_or_zero_out() 1640 sector_t sector = peer_req->i.sector; in drbd_submit_peer_request() local 1693 /* > peer_req->i.sector, unless this is the first bio */ in drbd_submit_peer_request() 1694 bio->bi_iter.bi_sector = sector; in drbd_submit_peer_request() 1707 sector += len >> 9; in drbd_submit_peer_request() 1847 read_in_block(struct drbd_peer_device *peer_device, u64 id, sector_t sector, in read_in_block() argument 1897 if (sector + (ds>>9) > capacity) { in read_in_block() [all …]
|
/linux/block/ |
H A D | blk-lib.c | 13 static sector_t bio_discard_limit(struct block_device *bdev, sector_t sector) in bio_discard_limit() argument 19 sector += bdev->bd_start_sect; in bio_discard_limit() 22 round_up(sector, discard_granularity >> SECTOR_SHIFT); in bio_discard_limit() 28 if (granularity_aligned_sector != sector) in bio_discard_limit() 29 return granularity_aligned_sector - sector; in bio_discard_limit() 39 sector_t *sector, sector_t *nr_sects, gfp_t gfp_mask) in blk_alloc_discard_bio() argument 41 sector_t bio_sects = min(*nr_sects, bio_discard_limit(bdev, *sector)); in blk_alloc_discard_bio() 50 bio->bi_iter.bi_sector = *sector; in blk_alloc_discard_bio() 52 *sector += bio_sects; in blk_alloc_discard_bio() 63 int __blkdev_issue_discard(struct block_device *bdev, sector_t sector, in __blkdev_issue_discard() argument [all …]
|
H A D | blk-zoned.c | 137 * @sector: Sector from which to report zones 143 * Get zone information starting from the zone containing @sector for at most 145 * To report all zones in a device starting from @sector, the BLK_ALL_ZONES 153 int blkdev_report_zones(struct block_device *bdev, sector_t sector, in blkdev_report_zones() argument 167 if (!nr_zones || sector >= capacity) in blkdev_report_zones() 170 return disk->fops->report_zones(disk, sector, nr_zones, in blkdev_report_zones() 187 * @sector: Start sector of the first zone to operate on 193 * @sector..@sector+@nr_sectors. Specifying the entire disk sector range 199 sector_t sector, sector_t nr_sectors) in blkdev_zone_mgmt() argument 203 sector_t end_sector = sector + nr_sectors; in blkdev_zone_mgmt() [all …]
|
/linux/drivers/block/ |
H A D | brd.c | 47 * Look up and return a brd's page for a given sector. 49 static struct page *brd_lookup_page(struct brd_device *brd, sector_t sector) in brd_lookup_page() argument 51 return xa_load(&brd->brd_pages, sector >> PAGE_SECTORS_SHIFT); in brd_lookup_page() 55 * Insert a new page for a given sector, if one does not already exist. 57 static int brd_insert_page(struct brd_device *brd, sector_t sector, gfp_t gfp) in brd_insert_page() argument 59 pgoff_t idx = sector >> PAGE_SECTORS_SHIFT; in brd_insert_page() 63 page = brd_lookup_page(brd, sector); in brd_insert_page() 105 static int copy_to_brd_setup(struct brd_device *brd, sector_t sector, size_t n, in copy_to_brd_setup() argument 108 unsigned int offset = (sector & (PAGE_SECTORS-1)) << SECTOR_SHIFT; in copy_to_brd_setup() 113 ret = brd_insert_page(brd, sector, gfp); in copy_to_brd_setup() [all …]
|
/linux/include/uapi/linux/ |
H A D | blkzoned.h | 88 * @start: Zone start in 512 B sector units 89 * @len: Zone length in 512 B sector units 90 * @wp: Zone write pointer location in 512 B sector units 97 * @capacity: Zone usable capacity in 512 B sector units 101 * start, len, capacity and wp use the regular 512 B sector unit, regardless 107 __u64 start; /* Zone start sector */ 122 * @sector: starting sector of report 130 __u64 sector; member 140 * @sector: Starting sector of the first zone to operate on. 144 __u64 sector; member [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 155 an attacker reading the journal could see the last sector numbers 156 that were written. From the sector numbers, the attacker can infer 161 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 152 Virtual device will announce this size as a minimal IO and logical sector. 155 IV generators will use sector number counted in <sector_size> units 159 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() 240 static int rfd_ftl_readsect(struct mtd_blktrans_dev *dev, u_long sector, char *buf) in rfd_ftl_readsect() argument 247 if (sector >= part->sector_count) in rfd_ftl_readsect() 250 addr = part->sector_map[sector]; in rfd_ftl_readsect() 384 "read sector for relocation\n", in move_block_contents() 429 * Postpone reclaiming if there is a free sector as in reclaim_block() [all …]
|
/linux/fs/zonefs/ |
H A D | trace.h | 30 __field(sector_t, sector) 38 __entry->sector = z->z_sector; 41 TP_printk("bdev=(%d,%d), ino=%lu op=%s, sector=%llu, nr_sectors=%llu", 43 blk_op_str(__entry->op), __entry->sector, 54 __field(sector_t, sector) 62 __entry->sector = zonefs_inode_zone(inode)->z_sector; 68 TP_printk("bdev=(%d, %d), ino=%lu, sector=%llu, size=%zu, wpoffset=%llu, ret=%zu", 70 __entry->sector, __entry->size, __entry->wpoffset,
|
/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/fs/xfs/libxfs/ |
H A D | xfs_trans_resv.c | 272 * the agfs of the ags containing the blocks: nr_ops * sector size 305 * the agfs of the ags from which the extents are allocated: 2 * sector 306 * the superblock free block counter: sector size 311 * the agfs of the ags from which the extents are allocated: 2 * sector 312 * the superblock free block counter: sector size 317 * the agfs of the ags containing the blocks: 2 * sector size 318 * the agfls of the ags containing the blocks: 2 * sector size 319 * the super block free block counter: sector size 387 * the agf for each of the ags: 4 * sector size 388 * the agfl for each of the ags: 4 * sector size [all …]
|
/linux/fs/fat/ |
H A D | cache.c | 310 int fat_get_mapped_cluster(struct inode *inode, sector_t sector, in fat_get_mapped_cluster() argument 318 cluster = sector >> (sbi->cluster_bits - sb->s_blocksize_bits); in fat_get_mapped_cluster() 319 offset = sector & (sbi->sec_per_clus - 1); in fat_get_mapped_cluster() 326 if (*mapped_blocks > last_block - sector) in fat_get_mapped_cluster() 327 *mapped_blocks = last_block - sector; in fat_get_mapped_cluster() 333 static int is_exceed_eof(struct inode *inode, sector_t sector, in is_exceed_eof() argument 341 if (sector >= *last_block) { in is_exceed_eof() 351 if (sector >= *last_block) in is_exceed_eof() 358 int fat_bmap(struct inode *inode, sector_t sector, sector_t *phys, in fat_bmap() argument 367 if (sector < (sbi->dir_entries >> sbi->dir_per_block_bits)) { in fat_bmap() [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() 194 if (!vdpasim_blk_check_range(vdpasim, sector, in vdpasim_blk_handle_req() 255 sector = le64_to_cpu(range.sector); in vdpasim_blk_handle_req() [all …]
|
/linux/block/partitions/ |
H A D | msdos.c | 75 Sector sect; in aix_magic_present() 135 Sector sect; in parse_extended() 229 __le32 s_start; /* start sector no of partition */ 238 __le16 v_sectorsz; /* sector size in bytes */ 254 Sector sect; in parse_solaris_x86() 313 __u32 d_secsize; /* # of bytes per sector */ 323 __u16 d_interleave; /* hardware sector interleave */ 324 __u16 d_trackskew; /* sector 0 skew, per track */ 325 __u16 d_cylskew; /* sector 0 skew, per cylinder */ 342 __le32 p_offset; /* starting sector */ [all …]
|
H A D | acorn.c | 74 Sector sect; in riscix_partition() 129 Sector sect; in linux_partition() 163 Sector sect; in adfspart_check_CUMANA() 170 * Try Cumana style partitions - sector 6 contains ADFS boot block in adfspart_check_CUMANA() 244 * Returns: -1 on error, 0 for no ADFS boot sector, 1 for ok. 253 Sector sect; in adfspart_check_ADFS() 311 Sector sect; in adfspart_check_ICSLinux() 355 Sector sect; in adfspart_check_ICS() 358 * Try ICS style partitions - sector 0 contains partition info. in adfspart_check_ICS() 387 * Our own extension - We use the first sector in adfspart_check_ICS() [all …]
|
/linux/drivers/md/ |
H A D | raid0.c | 128 * now since we have the hard sector sizes, we can make sure in create_strip_zones() 129 * chunk size is a multiple of that sector size in create_strip_zones() 305 sector_t sector = *sectorp; in find_zone() local 308 if (sector < z[i].zone_end) { in find_zone() 310 *sectorp = sector - z[i-1].zone_end; in find_zone() 321 sector_t sector, sector_t *sector_offset) in map_sector() argument 331 /* find the sector offset inside the chunk */ in map_sector() 332 sect_in_chunk = sector & (chunk_sects - 1); in map_sector() 333 sector >>= chunksect_bits; in map_sector() 339 sect_in_chunk = sector_div(sector, chunk_sects); in map_sector() [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/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 …]
|