Pull btrfs updates from David Sterba: "Highlights: - speedup dead root detection during orphan cleanup, eg. when there are many deleted subvolumes waiting to be cleaned, the trees are now looked up in radix tree instead of a O(N^2) search - snapshot creation with inherited qgroup will mark the qgroup inconsistent, requires a rescan - send will emit file capabilities after chown, this produces a stream that does not need postprocessing to set the capabilities again - direct io ported to iomap infrastructure, cleaned up and simplified code, notably removing last use of struct buffer_head in btrfs code Core changes: - factor out backreference iteration, to be used by ordinary backreferences and relocation code - improved global block reserve utilization * better logic to serialize requests * increased maximum available for unlink * improved handling on large pages (64K) - direct io cleanups and fixes * simplify layering, where cloned bios were unnecessarily created for some cases * error handling fixes (submit, endio) * remove repair worker thread, used to avoid deadlocks during repair - refactored block group reading code, preparatory work for new type of block group storage that should improve mount time on large filesystems Cleanups: - cleaned up (and slightly sped up) set/get helpers for metadata data structure members - root bit REF_COWS got renamed to SHAREABLE to reflect the that the blocks of the tree get shared either among subvolumes or with the relocation trees Fixes: - when subvolume deletion fails due to ENOSPC, the filesystem is not turned read-only - device scan deals with devices from other filesystems that changed ownership due to overwrite (mkfs) - fix a race between scrub and block group removal/allocation - fix long standing bug of a runaway balance operation, printing the same line to the syslog, caused by a stale status bit on a reloc tree that prevented progress - fix corrupt log due to concurrent fsync of inodes with shared extents - fix space underflow for NODATACOW and buffered writes when it for some reason needs to fallback to COW mode" * tag 'for-5.8-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux: (133 commits) btrfs: fix space_info bytes_may_use underflow during space cache writeout btrfs: fix space_info bytes_may_use underflow after nocow buffered write btrfs: fix wrong file range cleanup after an error filling dealloc range btrfs: remove redundant local variable in read_block_for_search btrfs: open code key_search btrfs: split btrfs_direct_IO to read and write part btrfs: remove BTRFS_INODE_READDIO_NEED_LOCK fs: remove dio_end_io() btrfs: switch to iomap_dio_rw() for dio iomap: remove lockdep_assert_held() iomap: add a filesystem hook for direct I/O bio submission fs: export generic_file_buffered_read() btrfs: turn space cache writeout failure messages into debug messages btrfs: include error on messages about failure to write space/inode caches btrfs: remove useless 'fail_unlock' label from btrfs_csum_file_blocks() btrfs: do not ignore error from btrfs_next_leaf() when inserting checksums btrfs: make checksum item extension more efficient btrfs: fix corrupt log due to concurrent fsync of inodes with shared extents btrfs: unexport btrfs_compress_set_level() btrfs: simplify iget helpers ...
Showing the changes to include/linux (3 of 52 files). Show all
Unified · Split
| @@ -169,6 +169,14 @@ static inline void bio_advance_iter(const struct bio *bio, · 168 unmodified lines | ||
| 169 | 169 | #define bio_for_each_bvec(bvl, bio, iter) \ |
| 170 | 170 | __bio_for_each_bvec(bvl, bio, iter, (bio)->bi_iter) |
| 171 | 171 | |
| 172 | +/* | |
| 173 | + * Iterate over all multi-page bvecs. Drivers shouldn't use this version for the | |
| 174 | + * same reasons as bio_for_each_segment_all(). | |
| 175 | + */ | |
| 176 | +#define bio_for_each_bvec_all(bvl, bio, i) \ | |
| 177 | + for (i = 0, bvl = bio_first_bvec_all(bio); \ | |
| 178 | + i < (bio)->bi_vcnt; i++, bvl++) \ | |
| 179 | + | |
| 172 | 180 | #define bio_iter_last(bvec, iter) ((iter).bi_size == (bvec).bv_len) |
| 173 | 181 | |
| 174 | 182 | static inline unsigned bio_segments(struct bio *bio) |
| @@ -3148,6 +3148,8 @@ extern int generic_file_rw_checks(struct file *file_in, struct file *file_out); · 3147 unmodified lines | ||
| 3148 | 3148 | extern int generic_copy_file_checks(struct file *file_in, loff_t pos_in, |
| 3149 | 3149 | struct file *file_out, loff_t pos_out, |
| 3150 | 3150 | size_t *count, unsigned int flags); |
| 3151 | +extern ssize_t generic_file_buffered_read(struct kiocb *iocb, | |
| 3152 | + struct iov_iter *to, ssize_t already_read); | |
| 3151 | 3153 | extern ssize_t generic_file_read_iter(struct kiocb *, struct iov_iter *); |
| 3152 | 3154 | extern ssize_t __generic_file_write_iter(struct kiocb *, struct iov_iter *); |
| 3153 | 3155 | extern ssize_t generic_file_write_iter(struct kiocb *, struct iov_iter *); |
| @@ -3209,8 +3211,6 @@ enum { · 55 unmodified lines | ||
| 3209 | 3211 | DIO_SKIP_HOLES = 0x02, |
| 3210 | 3212 | }; |
| 3211 | 3213 | |
| 3212 | −void dio_end_io(struct bio *bio); | |
| 3213 | − | |
| 3214 | 3214 | ssize_t __blockdev_direct_IO(struct kiocb *iocb, struct inode *inode, |
| 3215 | 3215 | struct block_device *bdev, struct iov_iter *iter, |
| 3216 | 3216 | get_block_t get_block, |
| @@ -251,6 +251,8 @@ int iomap_writepages(struct address_space *mapping, · 250 unmodified lines | ||
| 251 | 251 | struct iomap_dio_ops { |
| 252 | 252 | int (*end_io)(struct kiocb *iocb, ssize_t size, int error, |
| 253 | 253 | unsigned flags); |
| 254 | + blk_qc_t (*submit_io)(struct inode *inode, struct iomap *iomap, | |
| 255 | + struct bio *bio, loff_t file_offset); | |
| 254 | 256 | }; |
| 255 | 257 | |
| 256 | 258 | ssize_t iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter, |