]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
Merge branch 'qgroup' of git://git.jan-o-sch.net/btrfs-unstable into for-linus
authorChris Mason <chris.mason@fusionio.com>
Wed, 25 Jul 2012 20:11:38 +0000 (16:11 -0400)
committerChris Mason <chris.mason@fusionio.com>
Wed, 25 Jul 2012 20:11:38 +0000 (16:11 -0400)
Conflicts:
fs/btrfs/ioctl.c
fs/btrfs/ioctl.h
fs/btrfs/transaction.c
fs/btrfs/transaction.h

Signed-off-by: Chris Mason <chris.mason@fusionio.com>
1  2 
fs/btrfs/ctree.h
fs/btrfs/disk-io.c
fs/btrfs/extent-tree.c
fs/btrfs/ioctl.c
fs/btrfs/ioctl.h
fs/btrfs/transaction.c
fs/btrfs/transaction.h

Simple merge
Simple merge
Simple merge
index 17facea6a51c8428878dffe52a9910b825fb8fd8,1dffd0adf975fcd2aa3c54f3bd991928384ec245..e54b663fd3aab34972ee5a4d3ee21a54617df289
  }
  
  static noinline int btrfs_ioctl_snap_create_transid(struct file *file,
-                                                   char *name,
-                                                   unsigned long fd,
-                                                   int subvol,
-                                                   u64 *transid,
-                                                   bool readonly)
+                               char *name, unsigned long fd, int subvol,
+                               u64 *transid, bool readonly,
+                               struct btrfs_qgroup_inherit **inherit)
  {
 -      struct btrfs_root *root = BTRFS_I(fdentry(file)->d_inode)->root;
        struct file *src_file;
        int namelen;
        int ret = 0;
                }
                ret = btrfs_mksubvol(&file->f_path, name, namelen,
                                     BTRFS_I(src_inode)->root,
-                                    transid, readonly);
+                                    transid, readonly, inherit);
                fput(src_file);
        }
 +out_drop_write:
 +      mnt_drop_write_file(file);
  out:
        return ret;
  }
@@@ -3484,7 -3675,17 +3686,15 @@@ long btrfs_ioctl(struct file *file, uns
        case BTRFS_IOC_BALANCE_PROGRESS:
                return btrfs_ioctl_balance_progress(root, argp);
        case BTRFS_IOC_GET_DEV_STATS:
 -              return btrfs_ioctl_get_dev_stats(root, argp, 0);
 -      case BTRFS_IOC_GET_AND_RESET_DEV_STATS:
 -              return btrfs_ioctl_get_dev_stats(root, argp, 1);
 +              return btrfs_ioctl_get_dev_stats(root, argp);
+       case BTRFS_IOC_QUOTA_CTL:
+               return btrfs_ioctl_quota_ctl(root, argp);
+       case BTRFS_IOC_QGROUP_ASSIGN:
+               return btrfs_ioctl_qgroup_assign(root, argp);
+       case BTRFS_IOC_QGROUP_CREATE:
+               return btrfs_ioctl_qgroup_create(root, argp);
+       case BTRFS_IOC_QGROUP_LIMIT:
+               return btrfs_ioctl_qgroup_limit(root, argp);
        }
  
        return -ENOTTY;
index 4e3e5d342a2b3105d3ec0947ebacd2c519efcf24,cdda57f1c240cefd94422179d17856e0b1e0050a..3f9701d571ea39f8251f7c3fc2139244293111a8
@@@ -363,8 -411,17 +415,16 @@@ struct btrfs_ioctl_qgroup_create_args 
                                        struct btrfs_ioctl_ino_path_args)
  #define BTRFS_IOC_LOGICAL_INO _IOWR(BTRFS_IOCTL_MAGIC, 36, \
                                        struct btrfs_ioctl_ino_path_args)
 -#define BTRFS_IOC_GET_DEV_STATS _IOWR(BTRFS_IOCTL_MAGIC, 52, \
 -                                    struct btrfs_ioctl_get_dev_stats)
 -#define BTRFS_IOC_GET_AND_RESET_DEV_STATS _IOWR(BTRFS_IOCTL_MAGIC, 53, \
 -                                      struct btrfs_ioctl_get_dev_stats)
 -
 +#define BTRFS_IOC_DEVICES_READY _IOR(BTRFS_IOCTL_MAGIC, 39, \
 +                                   struct btrfs_ioctl_vol_args)
+ #define BTRFS_IOC_QUOTA_CTL _IOWR(BTRFS_IOCTL_MAGIC, 40, \
+                              struct btrfs_ioctl_quota_ctl_args)
+ #define BTRFS_IOC_QGROUP_ASSIGN _IOW(BTRFS_IOCTL_MAGIC, 41, \
+                              struct btrfs_ioctl_qgroup_assign_args)
+ #define BTRFS_IOC_QGROUP_CREATE _IOW(BTRFS_IOCTL_MAGIC, 42, \
+                              struct btrfs_ioctl_qgroup_create_args)
+ #define BTRFS_IOC_QGROUP_LIMIT _IOR(BTRFS_IOCTL_MAGIC, 43, \
+                              struct btrfs_ioctl_qgroup_limit_args)
 +#define BTRFS_IOC_GET_DEV_STATS _IOWR(BTRFS_IOCTL_MAGIC, 52, \
 +                                    struct btrfs_ioctl_get_dev_stats)
  #endif
index 328b95f67660af115fd0ac109ce1b6b5501260a7,127283913a42907edad5e486b3025e7a942cd57c..cc20e95ea2898ce11af1c100d781d1795a1fb187
@@@ -349,9 -354,9 +354,10 @@@ again
        h->transaction = cur_trans;
        h->blocks_used = 0;
        h->bytes_reserved = 0;
+       h->root = root;
        h->delayed_ref_updates = 0;
        h->use_count = 1;
 +      h->adding_csums = 0;
        h->block_rsv = NULL;
        h->orig_rsv = NULL;
        h->aborted = 0;
index d314a74b4968e28ab66b0033cab637e860983d3d,cca315dcdfcd0e7fd93499cf30a40c113777d729..e8b8416c688b2a7b5d6c4f79c844bb07953cb3b5
@@@ -57,7 -59,14 +59,15 @@@ struct btrfs_trans_handle 
        struct btrfs_block_rsv *block_rsv;
        struct btrfs_block_rsv *orig_rsv;
        int aborted;
 +      int adding_csums;
+       /*
+        * this root is only needed to validate that the root passed to
+        * start_transaction is the same as the one passed to end_transaction.
+        * Subvolume quota depends on this
+        */
+       struct btrfs_root *root;
+       struct seq_list delayed_ref_elem;
+       struct list_head qgroup_ref_list;
  };
  
  struct btrfs_pending_snapshot {