Home
last modified time | relevance | path

Searched full:sector (Results 1 – 25 of 621) sorted by relevance

12345678910>>...25

/linux/drivers/block/drbd/
H A Ddrbd_interval.c16 #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 Ddrbd_actlog.c127 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 …]
/linux/block/
H A Dblk-lib.c13 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 void __blkdev_issue_discard(struct block_device *bdev, sector_t sector, in __blkdev_issue_discard() argument
[all …]
H A Dblk-zoned.c161 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 …]
H A Dblk-ia-ranges.c18 return sprintf(buf, "%llu\n", iar->sector); in blk_ia_range_sector_show()
34 .attr = { .name = "sector", .mode = 0444 },
120 * At this point, iars is the new set of sector access ranges that needs in disk_register_independent_access_ranges()
176 sector_t sector) in disk_find_ia_range() argument
183 if (sector >= iar->sector && in disk_find_ia_range()
184 sector < iar->sector + iar->nr_sectors) in disk_find_ia_range()
196 sector_t sector = 0; in disk_check_ia_ranges() local
204 * ranges do not overlap, that there are no sector holes and that all in disk_check_ia_ranges()
208 tmp = disk_find_ia_range(iars, sector); in disk_check_ia_ranges()
209 if (!tmp || tmp->sector != sector) { in disk_check_ia_ranges()
[all …]
/linux/include/trace/events/
H A Dblock.h32 __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, __entry->nr_sector,
[all …]
H A Dbcache.h18 __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 Dblkzoned.h111 * @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/drivers/block/null_blk/
H A Dzoned.c56 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 Dnull_blk.h132 blk_status_t null_handle_discard(struct nullb_device *dev, sector_t sector,
135 sector_t sector, unsigned int nr_sectors);
136 blk_status_t null_handle_badblocks(struct nullb_cmd *cmd, sector_t sector,
139 sector_t sector, sector_t nr_sectors);
145 int null_report_zones(struct gendisk *disk, sector_t sector,
149 sector_t sector, sector_t nr_sectors);
151 sector_t sector, unsigned int len);
167 enum req_op op, sector_t sector, sector_t nr_sectors) in null_process_zoned_cmd() argument
172 sector_t sector, in null_zone_valid_read_len() argument
/linux/fs/hpfs/
H A Dhpfs.h29 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 Ddm-integrity.rst6 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 …]
/linux/drivers/scsi/
H A Dsr_vendor.c25 * 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 Drfd_ftl.c47 /* 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/fs/xfs/libxfs/
H A Dxfs_trans_resv.c274 * the agfs of the ags containing the blocks: nr_ops * sector size
314 * the agfs of the ags containing the blocks: nr_ops * sector size
338 * the agfs of the ags from which the extents are allocated: 2 * sector
339 * the superblock free block counter: sector size
344 * the agfs of the ags from which the extents are allocated: 2 * sector
345 * the superblock free block counter: sector size
350 * the agfs of the ags containing the blocks: 2 * sector size
351 * the agfls of the ags containing the blocks: 2 * sector size
352 * the super block free block counter: sector size
417 * the agf for each of the ags: nr * sector size
[all …]
/linux/fs/zonefs/
H A Dtrace.h30 __field(sector_t, sector)
38 __entry->sector = z->z_sector;
41 TP_printk("bdev=(%d,%d), ino=%llu 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=%llu, sector=%llu, size=%zu, wpoffset=%llu, ret=%zu",
70 __entry->sector, __entry->size, __entry->wpoffset,
/linux/drivers/md/
H A Ddm-log-writes.c72 * [ 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 Draid0.c134 * now since we have the hard sector sizes, we can make sure in create_strip_zones()
135 * chunk size is a multiple of that sector size in create_strip_zones()
309 sector_t sector = *sectorp; in find_zone() local
312 if (sector < z[i].zone_end) { in find_zone()
314 *sectorp = sector - z[i-1].zone_end; in find_zone()
325 sector_t sector, sector_t *sector_offset) in map_sector() argument
335 /* find the sector offset inside the chunk */ in map_sector()
336 sect_in_chunk = sector & (chunk_sects - 1); in map_sector()
337 sector >>= chunksect_bits; in map_sector()
343 sect_in_chunk = sector_div(sector, chunk_sects); in map_sector()
[all …]
/linux/fs/fat/
H A Dcache.c305 int fat_get_mapped_cluster(struct inode *inode, sector_t sector, in fat_get_mapped_cluster() argument
313 cluster = sector >> (sbi->cluster_bits - sb->s_blocksize_bits); in fat_get_mapped_cluster()
314 offset = sector & (sbi->sec_per_clus - 1); in fat_get_mapped_cluster()
321 if (*mapped_blocks > last_block - sector) in fat_get_mapped_cluster()
322 *mapped_blocks = last_block - sector; in fat_get_mapped_cluster()
328 static int is_exceed_eof(struct inode *inode, sector_t sector, in is_exceed_eof() argument
336 if (sector >= *last_block) { in is_exceed_eof()
346 if (sector >= *last_block) in is_exceed_eof()
353 int fat_bmap(struct inode *inode, sector_t sector, sector_t *phys, in fat_bmap() argument
362 if (sector < (sbi->dir_entries >> sbi->dir_per_block_bits)) { in fat_bmap()
[all …]
/linux/block/partitions/
H A Dmsdos.c75 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()
304 __u32 d_secsize; /* # of bytes per sector */
314 __u16 d_interleave; /* hardware sector interleave */
315 __u16 d_trackskew; /* sector 0 skew, per track */
316 __u16 d_cylskew; /* sector 0 skew, per cylinder */
333 __le32 p_offset; /* starting sector */
[all …]
/linux/fs/hfsplus/
H A Dwrapper.c30 * @sector: block to read or write, for blocks of HFSPLUS_SECTOR_SIZE bytes
37 * @data will return a pointer to the start of the requested sector,
40 * If @sector is not aligned to the bdev logical block size it will
48 int hfsplus_submit_bio(struct super_block *sb, sector_t sector, in hfsplus_submit_bio() argument
52 loff_t start = (loff_t)sector << HFSPLUS_SECTOR_SHIFT; in hfsplus_submit_bio()
59 * Align sector to hardware sector size and find offset. We assume that in hfsplus_submit_bio()
62 sector &= ~((io_size >> HFSPLUS_SECTOR_SHIFT) - 1); in hfsplus_submit_bio()
63 return bdev_rw_virt(sb->s_bdev, sector, buf, io_size, opf); in hfsplus_submit_bio()
208 * Block size must be at least as large as a sector and a multiple of 2. in hfsplus_read_wrapper()
/linux/drivers/vdpa/vdpa_sim/
H A Dvdpa_sim_blk.c84 "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/drivers/block/
H A Dbrd.c47 * 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/fs/btrfs/
H A Draid56.h44 * 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/fs/crypto/
H A Dbio.c73 loff_t pos, sector_t sector, in fscrypt_zeroout_range_inline_crypt() argument
87 bio->bi_iter.bi_sector = sector; in fscrypt_zeroout_range_inline_crypt()
98 sector += (bytes_this_page >> SECTOR_SHIFT); in fscrypt_zeroout_range_inline_crypt()
117 * @sector: the first sector to zero out
132 sector_t sector, u64 len) in fscrypt_zeroout_range() argument
152 return fscrypt_zeroout_range_inline_crypt(inode, pos, sector, in fscrypt_zeroout_range()
180 bio->bi_iter.bi_sector = sector; in fscrypt_zeroout_range()
191 sector += 1U << (du_bits - SECTOR_SHIFT); in fscrypt_zeroout_range()

12345678910>>...25