History

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs

Pull btrfs update from Chris Mason: "These are the usual mixture of bugs, cleanups and performance fixes. Miao has some really nice tuning of our crc code as well as our transaction commits. Josef is peeling off more and more problems related to early enospc, and has a number of important bug fixes in here too" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (81 commits) Btrfs: wait ordered range before doing direct io Btrfs: only do the tree_mod_log_free_eb if this is our last ref Btrfs: hold the tree mod lock in __tree_mod_log_rewind Btrfs: make backref walking code handle skinny metadata Btrfs: fix crash regarding to ulist_add_merge Btrfs: fix several potential problems in copy_nocow_pages_for_inode Btrfs: cleanup the code of copy_nocow_pages_for_inode() Btrfs: fix oops when recovering the file data by scrub function Btrfs: make the chunk allocator completely tree lockless Btrfs: cleanup orphaned root orphan item Btrfs: fix wrong mirror number tuning Btrfs: cleanup redundant code in btrfs_submit_direct() Btrfs: remove btrfs_sector_sum structure Btrfs: check if we can nocow if we don't have data space Btrfs: stop using try_to_writeback_inodes_sb_nr to flush delalloc Btrfs: use a percpu to keep track of possibly pinned bytes Btrfs: check for actual acls rather than just xattrs when caching no acl Btrfs: move btrfs_truncate_page to btrfs_cont_expand instead of btrfs_truncate Btrfs: optimize reada_for_balance Btrfs: optimize read_block_for_search ...

Linus Torvalds committed 13 years ago

Commit e3a0dd92 parents da89bd2 0e267c436 files · +2391 −1739Browse files

Showing the changes to include/uapi/linux (1 of 36 files). Show all

Unified · Split

include/uapi/linux/btrfs.h+41−1
@@ -447,6 +447,46 @@ struct btrfs_ioctl_send_args { · 446 unmodified lines
447447 __u64 reserved[4]; /* in */
448448 };
449449
450+/* Error codes as returned by the kernel */
451+enum btrfs_err_code {
452+ notused,
453+ BTRFS_ERROR_DEV_RAID1_MIN_NOT_MET,
454+ BTRFS_ERROR_DEV_RAID10_MIN_NOT_MET,
455+ BTRFS_ERROR_DEV_RAID5_MIN_NOT_MET,
456+ BTRFS_ERROR_DEV_RAID6_MIN_NOT_MET,
457+ BTRFS_ERROR_DEV_TGT_REPLACE,
458+ BTRFS_ERROR_DEV_MISSING_NOT_FOUND,
459+ BTRFS_ERROR_DEV_ONLY_WRITABLE,
460+ BTRFS_ERROR_DEV_EXCL_RUN_IN_PROGRESS
461+};
462+/* An error code to error string mapping for the kernel
463+* error codes
464+*/
465+static inline char *btrfs_err_str(enum btrfs_err_code err_code)
466+{
467+ switch (err_code) {
468+ case BTRFS_ERROR_DEV_RAID1_MIN_NOT_MET:
469+ return "unable to go below two devices on raid1";
470+ case BTRFS_ERROR_DEV_RAID10_MIN_NOT_MET:
471+ return "unable to go below four devices on raid10";
472+ case BTRFS_ERROR_DEV_RAID5_MIN_NOT_MET:
473+ return "unable to go below two devices on raid5";
474+ case BTRFS_ERROR_DEV_RAID6_MIN_NOT_MET:
475+ return "unable to go below three devices on raid6";
476+ case BTRFS_ERROR_DEV_TGT_REPLACE:
477+ return "unable to remove the dev_replace target dev";
478+ case BTRFS_ERROR_DEV_MISSING_NOT_FOUND:
479+ return "no missing devices found to remove";
480+ case BTRFS_ERROR_DEV_ONLY_WRITABLE:
481+ return "unable to remove the only writeable device";
482+ case BTRFS_ERROR_DEV_EXCL_RUN_IN_PROGRESS:
483+ return "add/delete/balance/replace/resize operation "\
484+ "in progress";
485+ default:
486+ return NULL;
487+ }
488+}
489+
450490 #define BTRFS_IOC_SNAP_CREATE _IOW(BTRFS_IOCTL_MAGIC, 1, \
451491 struct btrfs_ioctl_vol_args)
452492 #define BTRFS_IOC_DEFRAG _IOW(BTRFS_IOCTL_MAGIC, 2, \
@@ -530,6 +570,7 @@ struct btrfs_ioctl_send_args { · 77 unmodified lines
530570 struct btrfs_ioctl_quota_rescan_args)
531571 #define BTRFS_IOC_QUOTA_RESCAN_STATUS _IOR(BTRFS_IOCTL_MAGIC, 45, \
532572 struct btrfs_ioctl_quota_rescan_args)
573+#define BTRFS_IOC_QUOTA_RESCAN_WAIT _IO(BTRFS_IOCTL_MAGIC, 46)
533574 #define BTRFS_IOC_GET_FSLABEL _IOR(BTRFS_IOCTL_MAGIC, 49, \
534575 char[BTRFS_LABEL_SIZE])
535576 #define BTRFS_IOC_SET_FSLABEL _IOW(BTRFS_IOCTL_MAGIC, 50, \
@@ -538,5 +579,4 @@ struct btrfs_ioctl_send_args { · 2 unmodified lines
538579 struct btrfs_ioctl_get_dev_stats)
539580 #define BTRFS_IOC_DEV_REPLACE _IOWR(BTRFS_IOCTL_MAGIC, 53, \
540581 struct btrfs_ioctl_dev_replace_args)
541−
542582 #endif /* _UAPI_LINUX_BTRFS_H */