Skip to content

Commit 56feb53

Browse files
committed
Merge tag 'xfs-merge-7.0' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
Pull xfs updates from Carlos Maiolino: "This contains several improvements to zoned device support, performance improvements for the parent pointers, and a new health monitoring feature. There are some improvements in the journaling code too but no behavior change expected. Last but not least, some code refactoring and bug fixes are also included in this series" * tag 'xfs-merge-7.0' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux: (67 commits) xfs: add sysfs stats for zoned GC xfs: give the defer_relog stat a xs_ prefix xfs: add zone reset error injection xfs: refactor zone reset handling xfs: don't mark all discard issued by zoned GC as sync xfs: allow setting errortags at mount time xfs: use WRITE_ONCE/READ_ONCE for m_errortag xfs: move the guts of XFS_ERRORTAG_DELAY out of line xfs: don't validate error tags in the I/O path xfs: allocate m_errortag early xfs: fix the errno sign for the xfs_errortag_{add,clearall} stubs xfs: validate log record version against superblock log version xfs: fix spacing style issues in xfs_alloc.c xfs: remove xfs_zone_gc_space_available xfs: use a seprate member to track space availabe in the GC scatch buffer xfs: check for deleted cursors when revalidating two btrees xfs: fix UAF in xchk_btree_check_block_owner xfs: check return value of xchk_scrub_create_subord xfs: only call xf{array,blob}_destroy if we have a valid pointer xfs: get rid of the xchk_xfile_*_descr calls ...
2 parents 3893854 + e33839b commit 56feb53

222 files changed

Lines changed: 4255 additions & 1342 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Documentation/admin-guide/xfs.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,14 @@ When mounting an XFS filesystem, the following options are accepted.
215215
inconsistent namespace presentation during or after a
216216
failover event.
217217

218+
errortag=tagname
219+
When specified, enables the error inject tag named "tagname" with the
220+
default frequency. Can be specified multiple times to enable multiple
221+
errortags. Specifying this option on remount will reset the error tag
222+
to the default value if it was set to any other value before.
223+
This option is only supported when CONFIG_XFS_DEBUG is enabled, and
224+
will not be reflected in /proc/self/mounts.
225+
218226
Deprecation of V4 Format
219227
========================
220228

block/bio.c

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,40 @@ void bio_reset(struct bio *bio, struct block_device *bdev, blk_opf_t opf)
311311
}
312312
EXPORT_SYMBOL(bio_reset);
313313

314+
/**
315+
* bio_reuse - reuse a bio with the payload left intact
316+
* @bio: bio to reuse
317+
* @opf: operation and flags for the next I/O
318+
*
319+
* Allow reusing an existing bio for another operation with all set up
320+
* fields including the payload, device and end_io handler left intact.
321+
*
322+
* Typically used when @bio is first used to read data which is then written
323+
* to another location without modification. @bio must not be in-flight and
324+
* owned by the caller. Can't be used for cloned bios.
325+
*
326+
* Note: Can't be used when @bio has integrity or blk-crypto contexts for now.
327+
* Feel free to add that support when you need it, though.
328+
*/
329+
void bio_reuse(struct bio *bio, blk_opf_t opf)
330+
{
331+
unsigned short vcnt = bio->bi_vcnt, i;
332+
bio_end_io_t *end_io = bio->bi_end_io;
333+
void *private = bio->bi_private;
334+
335+
WARN_ON_ONCE(bio_flagged(bio, BIO_CLONED));
336+
WARN_ON_ONCE(bio_integrity(bio));
337+
WARN_ON_ONCE(bio_has_crypt_ctx(bio));
338+
339+
bio_reset(bio, bio->bi_bdev, opf);
340+
for (i = 0; i < vcnt; i++)
341+
bio->bi_iter.bi_size += bio->bi_io_vec[i].bv_len;
342+
bio->bi_vcnt = vcnt;
343+
bio->bi_private = private;
344+
bio->bi_end_io = end_io;
345+
}
346+
EXPORT_SYMBOL_GPL(bio_reuse);
347+
314348
static struct bio *__bio_chain_endio(struct bio *bio)
315349
{
316350
struct bio *parent = bio->bi_private;

fs/xfs/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ xfs-y += xfs_aops.o \
8888
xfs_globals.o \
8989
xfs_handle.o \
9090
xfs_health.o \
91+
xfs_healthmon.o \
9192
xfs_icache.o \
9293
xfs_ioctl.o \
9394
xfs_iomap.o \
@@ -105,6 +106,7 @@ xfs-y += xfs_aops.o \
105106
xfs_symlink.o \
106107
xfs_sysfs.o \
107108
xfs_trans.o \
109+
xfs_verify_media.o \
108110
xfs_xattr.o
109111

110112
# low-level transaction/log code

fs/xfs/libxfs/xfs_ag.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* All rights reserved.
66
*/
77

8-
#include "xfs.h"
8+
#include "xfs_platform.h"
99
#include "xfs_fs.h"
1010
#include "xfs_shared.h"
1111
#include "xfs_format.h"

fs/xfs/libxfs/xfs_ag_resv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright (C) 2016 Oracle. All Rights Reserved.
44
* Author: Darrick J. Wong <darrick.wong@oracle.com>
55
*/
6-
#include "xfs.h"
6+
#include "xfs_platform.h"
77
#include "xfs_fs.h"
88
#include "xfs_shared.h"
99
#include "xfs_format.h"

fs/xfs/libxfs/xfs_alloc.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright (c) 2000-2002,2005 Silicon Graphics, Inc.
44
* All Rights Reserved.
55
*/
6-
#include "xfs.h"
6+
#include "xfs_platform.h"
77
#include "xfs_fs.h"
88
#include "xfs_format.h"
99
#include "xfs_log_format.h"
@@ -376,8 +376,8 @@ xfs_alloc_compute_diff(
376376
xfs_agblock_t freeend; /* end of freespace extent */
377377
xfs_agblock_t newbno1; /* return block number */
378378
xfs_agblock_t newbno2; /* other new block number */
379-
xfs_extlen_t newlen1=0; /* length with newbno1 */
380-
xfs_extlen_t newlen2=0; /* length with newbno2 */
379+
xfs_extlen_t newlen1 = 0; /* length with newbno1 */
380+
xfs_extlen_t newlen2 = 0; /* length with newbno2 */
381381
xfs_agblock_t wantend; /* end of target extent */
382382
bool userdata = datatype & XFS_ALLOC_USERDATA;
383383

@@ -577,8 +577,8 @@ xfs_alloc_fixup_trees(
577577
int i; /* operation results */
578578
xfs_agblock_t nfbno1; /* first new free startblock */
579579
xfs_agblock_t nfbno2; /* second new free startblock */
580-
xfs_extlen_t nflen1=0; /* first new free length */
581-
xfs_extlen_t nflen2=0; /* second new free length */
580+
xfs_extlen_t nflen1 = 0; /* first new free length */
581+
xfs_extlen_t nflen2 = 0; /* second new free length */
582582
struct xfs_mount *mp;
583583
bool fixup_longest = false;
584584

fs/xfs/libxfs/xfs_alloc_btree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Copyright (c) 2000-2001,2005 Silicon Graphics, Inc.
44
* All Rights Reserved.
55
*/
6-
#include "xfs.h"
6+
#include "xfs_platform.h"
77
#include "xfs_fs.h"
88
#include "xfs_shared.h"
99
#include "xfs_format.h"

0 commit comments

Comments
 (0)