/block/ |
D | ioctl.c | 88 static int blk_ioctl_discard(struct block_device *bdev, blk_mode_t mode, in blk_ioctl_discard() argument 96 if (!(mode & BLK_OPEN_WRITE)) in blk_ioctl_discard() 118 err = truncate_bdev_range(bdev, mode, start, start + len - 1); in blk_ioctl_discard() 127 static int blk_ioctl_secure_erase(struct block_device *bdev, blk_mode_t mode, in blk_ioctl_secure_erase() argument 134 if (!(mode & BLK_OPEN_WRITE)) in blk_ioctl_secure_erase() 149 err = truncate_bdev_range(bdev, mode, start, start + len - 1); in blk_ioctl_secure_erase() 158 static int blk_ioctl_zeroout(struct block_device *bdev, blk_mode_t mode, in blk_ioctl_zeroout() argument 166 if (!(mode & BLK_OPEN_WRITE)) in blk_ioctl_zeroout() 187 err = truncate_bdev_range(bdev, mode, start, end); in blk_ioctl_zeroout() 247 int blkdev_compat_ptr_ioctl(struct block_device *bdev, blk_mode_t mode, in blkdev_compat_ptr_ioctl() argument [all …]
|
D | bdev.c | 101 int truncate_bdev_range(struct block_device *bdev, blk_mode_t mode, in truncate_bdev_range() argument 109 if (!(mode & BLK_OPEN_EXCL)) { in truncate_bdev_range() 116 if (!(mode & BLK_OPEN_EXCL)) in truncate_bdev_range() 641 static int blkdev_get_whole(struct block_device *bdev, blk_mode_t mode) in blkdev_get_whole() argument 647 ret = disk->fops->open(disk, mode); in blkdev_get_whole() 673 static int blkdev_get_part(struct block_device *part, blk_mode_t mode) in blkdev_get_part() argument 678 ret = blkdev_get_whole(bdev_whole(part), mode); in blkdev_get_part() 759 struct block_device *blkdev_get_by_dev(dev_t dev, blk_mode_t mode, void *holder, in blkdev_get_by_dev() argument 769 ((mode & BLK_OPEN_READ) ? DEVCG_ACC_READ : 0) | in blkdev_get_by_dev() 770 ((mode & BLK_OPEN_WRITE) ? DEVCG_ACC_WRITE : 0)); in blkdev_get_by_dev() [all …]
|
D | fops.c | 550 blk_mode_t mode = 0; in file_to_blk_mode() local 553 mode |= BLK_OPEN_READ; in file_to_blk_mode() 555 mode |= BLK_OPEN_WRITE; in file_to_blk_mode() 557 mode |= BLK_OPEN_EXCL; in file_to_blk_mode() 559 mode |= BLK_OPEN_NDELAY; in file_to_blk_mode() 567 mode |= BLK_OPEN_WRITE_IOCTL; in file_to_blk_mode() 569 return mode; in file_to_blk_mode() 745 static long blkdev_fallocate(struct file *file, int mode, loff_t start, in blkdev_fallocate() argument 755 if (mode & ~BLKDEV_FALLOC_FL_SUPPORTED) in blkdev_fallocate() 763 if (mode & FALLOC_FL_KEEP_SIZE) { in blkdev_fallocate() [all …]
|
D | blk-crypto.c | 346 const struct blk_crypto_mode *mode; in blk_crypto_init_key() local 353 mode = &blk_crypto_modes[crypto_mode]; in blk_crypto_init_key() 356 if (raw_key_size != mode->keysize) in blk_crypto_init_key() 360 if (raw_key_size < mode->security_strength || in blk_crypto_init_key() 368 if (dun_bytes == 0 || dun_bytes > mode->ivsize) in blk_crypto_init_key()
|
D | blk-zoned.c | 365 blk_mode_t mode, const struct blk_zone_range *zrange) in blkdev_truncate_zone_range() argument 377 return truncate_bdev_range(bdev, mode, start, end); in blkdev_truncate_zone_range() 384 int blkdev_zone_mgmt_ioctl(struct block_device *bdev, blk_mode_t mode, in blkdev_zone_mgmt_ioctl() argument 398 if (!(mode & BLK_OPEN_WRITE)) in blkdev_zone_mgmt_ioctl() 410 ret = blkdev_truncate_zone_range(bdev, mode, &zrange); in blkdev_zone_mgmt_ioctl()
|
D | blk-mq-sysfs.c | 106 .attr = {.name = "nr_tags", .mode = 0444 }, 110 .attr = {.name = "nr_reserved_tags", .mode = 0444 }, 114 .attr = {.name = "cpu_list", .mode = 0444 },
|
D | blk.h | 429 int blkdev_zone_mgmt_ioctl(struct block_device *bdev, blk_mode_t mode, 440 blk_mode_t mode, unsigned int cmd, unsigned long arg) in blkdev_zone_mgmt_ioctl() argument 482 int disk_scan_partitions(struct gendisk *disk, blk_mode_t mode); 498 int truncate_bdev_range(struct block_device *bdev, blk_mode_t mode,
|
D | genhd.c | 343 int disk_scan_partitions(struct gendisk *disk, blk_mode_t mode) in disk_scan_partitions() argument 359 if (!(mode & BLK_OPEN_EXCL)) { in disk_scan_partitions() 367 bdev = blkdev_get_by_dev(disk_devt(disk), mode & ~BLK_OPEN_EXCL, NULL, in disk_scan_partitions() 380 if (!(mode & BLK_OPEN_EXCL)) in disk_scan_partitions() 1123 return a->mode; in disk_visible() 1207 static char *block_devnode(const struct device *dev, umode_t *mode, in block_devnode() argument 1213 return disk->fops->devnode(disk, mode); in block_devnode()
|
D | blk-ia-ranges.c | 34 .attr = { .name = "sector", .mode = 0444 }, 39 .attr = { .name = "nr_sectors", .mode = 0444 },
|
D | blk-sysfs.c | 478 .attr = { .name = _name, .mode = 0444 }, \ 484 .attr = { .name = _name, .mode = 0644 }, \ 537 .attr = {.name = "hw_sector_size", .mode = 0444 }, 684 return attr->mode; in queue_attr_visible() 699 return attr->mode; in blk_mq_queue_attr_visible()
|
D | blk-mq-debugfs.h | 13 umode_t mode; member
|
D | blk-crypto-sysfs.c | 167 attr->attr.mode = 0444; in blk_crypto_sysfs_init()
|
D | bsg.c | 240 static char *bsg_devnode(const struct device *dev, umode_t *mode) in bsg_devnode() argument
|
D | blk-rq-qos.c | 207 unsigned int mode, int wake_flags, void *key) in rq_qos_wake_function() argument
|
D | kyber-iosched.c | 193 static int kyber_domain_wake(wait_queue_entry_t *wait, unsigned mode, int flags, 695 static int kyber_domain_wake(wait_queue_entry_t *wqe, unsigned mode, int flags, in kyber_domain_wake() argument
|
D | blk-mq-debugfs.c | 651 debugfs_create_file(attr->name, attr->mode, parent, in debugfs_create_files()
|
D | blk-iocost.c | 1461 static int iocg_wake_fn(struct wait_queue_entry *wq_entry, unsigned mode, in iocg_wake_fn() argument 1483 default_wake_function(wq_entry, mode, flags, key); in iocg_wake_fn()
|
D | blk-mq.c | 1802 static int blk_mq_dispatch_wake(wait_queue_entry_t *wait, unsigned mode, in blk_mq_dispatch_wake() argument
|