mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 16:30:52 +07:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable: Btrfs: fix ioctl arg size (userland incompatible change!) Btrfs: Clear the device->running_pending flag before bailing on congestion
This commit is contained in:
commit
4b48d9d44e
@ -22,13 +22,20 @@
|
|||||||
|
|
||||||
#define BTRFS_IOCTL_MAGIC 0x94
|
#define BTRFS_IOCTL_MAGIC 0x94
|
||||||
#define BTRFS_VOL_NAME_MAX 255
|
#define BTRFS_VOL_NAME_MAX 255
|
||||||
#define BTRFS_PATH_NAME_MAX 3072
|
#define BTRFS_PATH_NAME_MAX 4087
|
||||||
|
|
||||||
|
/* this should be 4k */
|
||||||
struct btrfs_ioctl_vol_args {
|
struct btrfs_ioctl_vol_args {
|
||||||
__s64 fd;
|
__s64 fd;
|
||||||
char name[BTRFS_PATH_NAME_MAX + 1];
|
char name[BTRFS_PATH_NAME_MAX + 1];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct btrfs_ioctl_clone_range_args {
|
||||||
|
__s64 src_fd;
|
||||||
|
__u64 src_offset, src_length;
|
||||||
|
__u64 dest_offset;
|
||||||
|
};
|
||||||
|
|
||||||
#define BTRFS_IOC_SNAP_CREATE _IOW(BTRFS_IOCTL_MAGIC, 1, \
|
#define BTRFS_IOC_SNAP_CREATE _IOW(BTRFS_IOCTL_MAGIC, 1, \
|
||||||
struct btrfs_ioctl_vol_args)
|
struct btrfs_ioctl_vol_args)
|
||||||
#define BTRFS_IOC_DEFRAG _IOW(BTRFS_IOCTL_MAGIC, 2, \
|
#define BTRFS_IOC_DEFRAG _IOW(BTRFS_IOCTL_MAGIC, 2, \
|
||||||
@ -52,11 +59,6 @@ struct btrfs_ioctl_vol_args {
|
|||||||
struct btrfs_ioctl_vol_args)
|
struct btrfs_ioctl_vol_args)
|
||||||
#define BTRFS_IOC_BALANCE _IOW(BTRFS_IOCTL_MAGIC, 12, \
|
#define BTRFS_IOC_BALANCE _IOW(BTRFS_IOCTL_MAGIC, 12, \
|
||||||
struct btrfs_ioctl_vol_args)
|
struct btrfs_ioctl_vol_args)
|
||||||
struct btrfs_ioctl_clone_range_args {
|
|
||||||
__s64 src_fd;
|
|
||||||
__u64 src_offset, src_length;
|
|
||||||
__u64 dest_offset;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define BTRFS_IOC_CLONE_RANGE _IOW(BTRFS_IOCTL_MAGIC, 13, \
|
#define BTRFS_IOC_CLONE_RANGE _IOW(BTRFS_IOCTL_MAGIC, 13, \
|
||||||
struct btrfs_ioctl_clone_range_args)
|
struct btrfs_ioctl_clone_range_args)
|
||||||
|
@ -582,7 +582,7 @@ static long btrfs_control_ioctl(struct file *file, unsigned int cmd,
|
|||||||
{
|
{
|
||||||
struct btrfs_ioctl_vol_args *vol;
|
struct btrfs_ioctl_vol_args *vol;
|
||||||
struct btrfs_fs_devices *fs_devices;
|
struct btrfs_fs_devices *fs_devices;
|
||||||
int ret = 0;
|
int ret = -ENOTTY;
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
if (!capable(CAP_SYS_ADMIN))
|
if (!capable(CAP_SYS_ADMIN))
|
||||||
@ -594,6 +594,7 @@ static long btrfs_control_ioctl(struct file *file, unsigned int cmd,
|
|||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
len = strnlen(vol->name, BTRFS_PATH_NAME_MAX);
|
len = strnlen(vol->name, BTRFS_PATH_NAME_MAX);
|
||||||
|
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case BTRFS_IOC_SCAN_DEV:
|
case BTRFS_IOC_SCAN_DEV:
|
||||||
ret = btrfs_scan_one_device(vol->name, FMODE_READ,
|
ret = btrfs_scan_one_device(vol->name, FMODE_READ,
|
||||||
|
@ -220,6 +220,7 @@ static noinline int run_scheduled_bios(struct btrfs_device *device)
|
|||||||
tail->bi_next = old_head;
|
tail->bi_next = old_head;
|
||||||
else
|
else
|
||||||
device->pending_bio_tail = tail;
|
device->pending_bio_tail = tail;
|
||||||
|
device->running_pending = 0;
|
||||||
|
|
||||||
spin_unlock(&device->io_lock);
|
spin_unlock(&device->io_lock);
|
||||||
btrfs_requeue_work(&device->work);
|
btrfs_requeue_work(&device->work);
|
||||||
|
Loading…
Reference in New Issue
Block a user