Function report |
Source Code:block\ioctl.c |
Create Date:2022-07-28 17:16:44 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:always keep this in sync with compat_blkdev_ioctl()
Proto:int blkdev_ioctl(struct block_device *bdev, fmode_t mode, unsigned cmd, unsigned long arg)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct block_device * | bdev | |
fmode_t | mode | |
unsigned | cmd | |
unsigned long | arg |
494 | Case cmd == lush buffer cache |
495 | Return blkdev_flushbuf(bdev, mode, cmd, arg) |
496 | Case cmd == set device read-only (0 = read-write) |
497 | Return blkdev_roset(bdev, mode, cmd, arg) |
498 | Case cmd == BLKDISCARD |
499 | Return blk_ioctl_discard(bdev, mode, arg, 0) |
500 | Case cmd == BLKSECDISCARD |
501 | Return blk_ioctl_discard(bdev, mode, arg, ssue a secure erase ) |
503 | Case cmd == BLKZEROOUT |
504 | Return blk_ioctl_zeroout(bdev, mode, arg) |
506 | Return blkdev_report_zones_ioctl(bdev, mode, cmd, arg) |
507 | Case cmd == BLKRESETZONE |
508 | Case cmd == BLKOPENZONE |
509 | Case cmd == BLKCLOSEZONE |
510 | Case cmd == BLKFINISHZONE |
511 | Return blkdev_zone_mgmt_ioctl(bdev, mode, cmd, arg) |
512 | Case cmd == BLKGETZONESZ |
513 | Return put_uint(arg, bdev_zone_sectors(bdev)) |
514 | Case cmd == BLKGETNRZONES |
515 | Return put_uint(arg, blkdev_nr_zones(bd_disk)) |
516 | Case cmd == get device geometry |
517 | Return blkdev_getgeo(bdev, argp) |
518 | Case cmd == get current read ahead setting |
519 | Case cmd == get filesystem (mm/filemap.c) read-ahead |
523 | Case cmd == get read-only status (0 = read_write) |
524 | Return put_int(arg, bdev_read_only(bdev) != 0) |
526 | Return put_int(arg, block_size(bdev)) |
527 | Case cmd == get block device sector size |
528 | Return put_int(arg, bdev_logical_block_size(bdev)) |
529 | Case cmd == BLKPBSZGET |
530 | Return put_uint(arg, bdev_physical_block_size(bdev)) |
532 | Return put_uint(arg, bdev_io_min(bdev)) |
534 | Return put_uint(arg, bdev_io_opt(bdev)) |
535 | Case cmd == BLKALIGNOFF |
536 | Return put_int(arg, bdev_alignment_offset(bdev)) |
537 | Case cmd == BLKDISCARDZEROES |
539 | Case cmd == get max sectors per request (ll_rw_blk.c) |
542 | Return put_ushort(arg, max_sectors) |
543 | Case cmd == BLKROTATIONAL |
544 | Return put_ushort(arg, !blk_queue_nonrot(bdev_get_queue(bdev))) |
545 | Case cmd == set read ahead for block device |
546 | Case cmd == set filesystem (mm/filemap.c) read-ahead |
547 | If Not Check operation authority Then Return -EACCES |
550 | Return 0 |
552 | Return set the logical block size |
554 | Return blkpg_ioctl(bdev, argp) |
555 | Case cmd == -read partition table |
556 | Return blkdev_reread_part(bdev) |
557 | Case cmd == urn device size /512 (long *arg) |
562 | Case cmd == urn device size in bytes (u64 *arg) |
564 | Case cmd == BLKTRACESTART |
565 | Case cmd == BLKTRACESTOP |
566 | Case cmd == BLKTRACESETUP |
567 | Case cmd == BLKTRACETEARDOWN |
568 | Return blk_trace_ioctl(bdev, cmd, argp) |
569 | Case cmd == IOC_PR_REGISTER |
570 | Return blkdev_pr_register(bdev, argp) |
571 | Case cmd == IOC_PR_RESERVE |
572 | Return blkdev_pr_reserve(bdev, argp) |
573 | Case cmd == IOC_PR_RELEASE |
574 | Return blkdev_pr_release(bdev, argp) |
575 | Case cmd == IOC_PR_PREEMPT |
576 | Return blkdev_pr_preempt(bdev, argp, false) |
577 | Case cmd == IOC_PR_PREEMPT_ABORT |
578 | Return blkdev_pr_preempt(bdev, argp, true) |
579 | Case cmd == IOC_PR_CLEAR |
580 | Return blkdev_pr_clear(bdev, argp) |
581 | Default |
582 | Return __blkdev_driver_ioctl(bdev, mode, cmd, arg) |
Name | Describe |
---|---|
compat_blkpg_ioctl | |
compat_blkdev_ioctl | Most of the generic ioctls are handled in the normal fallback path.This assumes the blkdev's low level compat_ioctl always returnsENOIOCTLCMD for unknown ioctls. |
ioctl_by_bdev |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |