From: Stephen Rothwell <sfr@canb.auug.org.au>
To: "Darrick J. Wong" <djwong@kernel.org>,
David Chinner <david@fromorbit.com>
Cc: <linux-xfs@vger.kernel.org>,
Christian Brauner <brauner@kernel.org>,
Dave Chinner <dchinner@redhat.com>,
Jeff Layton <jlayton@kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: linux-next: manual merge of the xfs tree with Linus' tree
Date: Tue, 31 Oct 2023 11:41:58 +1100 [thread overview]
Message-ID: <20231031114158.548ff433@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 4917 bytes --]
Hi all,
Today's linux-next merge of the xfs tree got conflicts in:
fs/xfs/libxfs/xfs_rtbitmap.c
fs/xfs/xfs_rtalloc.c
between commit:
75d1e312bbbd ("xfs: convert to new timestamp accessors")
from Linus' tree and commit:
41f33d82cfd3 ("xfs: consolidate realtime allocation arguments")
a684c538bc14 ("xfs: convert xfs_extlen_t to xfs_rtxlen_t in the rt allocator")
2d5f216b77e3 ("xfs: convert rt extent numbers to xfs_rtxnum_t")
from the xfs tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc fs/xfs/libxfs/xfs_rtbitmap.c
index 396648acb5be,b332ab490a48..000000000000
--- a/fs/xfs/libxfs/xfs_rtbitmap.c
+++ b/fs/xfs/libxfs/xfs_rtbitmap.c
@@@ -960,19 -931,18 +931,19 @@@ xfs_rtcheck_alloc_range
* Free an extent in the realtime subvolume. Length is expressed in
* realtime extents, as is the block number.
*/
- int /* error */
+ int
xfs_rtfree_extent(
- xfs_trans_t *tp, /* transaction pointer */
- xfs_rtblock_t bno, /* starting block number to free */
- xfs_extlen_t len) /* length of extent freed */
+ struct xfs_trans *tp, /* transaction pointer */
+ xfs_rtxnum_t start, /* starting rtext number to free */
+ xfs_rtxlen_t len) /* length of extent freed */
{
- int error; /* error value */
- xfs_mount_t *mp; /* file system mount structure */
- xfs_fsblock_t sb; /* summary file block number */
- struct xfs_buf *sumbp = NULL; /* summary file block buffer */
- struct timespec64 atime;
-
- mp = tp->t_mountp;
+ struct xfs_mount *mp = tp->t_mountp;
+ struct xfs_rtalloc_args args = {
+ .mp = mp,
+ .tp = tp,
+ };
+ int error;
++ struct timespec64 atime;
ASSERT(mp->m_rbmip->i_itemp != NULL);
ASSERT(xfs_isilocked(mp->m_rbmip, XFS_ILOCK_EXCL));
@@@ -1000,13 -970,46 +971,49 @@@
mp->m_sb.sb_rextents) {
if (!(mp->m_rbmip->i_diflags & XFS_DIFLAG_NEWRTBM))
mp->m_rbmip->i_diflags |= XFS_DIFLAG_NEWRTBM;
- *(uint64_t *)&VFS_I(mp->m_rbmip)->i_atime = 0;
+
+ atime = inode_get_atime(VFS_I(mp->m_rbmip));
+ *((uint64_t *)&atime) = 0;
+ inode_set_atime_to_ts(VFS_I(mp->m_rbmip), atime);
xfs_trans_log_inode(tp, mp->m_rbmip, XFS_ILOG_CORE);
}
- return 0;
+ error = 0;
+ out:
+ xfs_rtbuf_cache_relse(&args);
+ return error;
+ }
+
+ /*
+ * Free some blocks in the realtime subvolume. rtbno and rtlen are in units of
+ * rt blocks, not rt extents; must be aligned to the rt extent size; and rtlen
+ * cannot exceed XFS_MAX_BMBT_EXTLEN.
+ */
+ int
+ xfs_rtfree_blocks(
+ struct xfs_trans *tp,
+ xfs_fsblock_t rtbno,
+ xfs_filblks_t rtlen)
+ {
+ struct xfs_mount *mp = tp->t_mountp;
+ xfs_rtxnum_t start;
+ xfs_filblks_t len;
+ xfs_extlen_t mod;
+
+ ASSERT(rtlen <= XFS_MAX_BMBT_EXTLEN);
+
+ len = xfs_rtb_to_rtxrem(mp, rtlen, &mod);
+ if (mod) {
+ ASSERT(mod == 0);
+ return -EIO;
+ }
+
+ start = xfs_rtb_to_rtxrem(mp, rtbno, &mod);
+ if (mod) {
+ ASSERT(mod == 0);
+ return -EIO;
+ }
+
+ return xfs_rtfree_extent(tp, start, len);
}
/* Find all the free records within a given range. */
diff --cc fs/xfs/xfs_rtalloc.c
index 2e1a4e5cd03d,ba66442910b1..000000000000
--- a/fs/xfs/xfs_rtalloc.c
+++ b/fs/xfs/xfs_rtalloc.c
@@@ -1420,16 -1414,16 +1414,16 @@@ xfs_rtunmount_inodes
*/
int /* error */
xfs_rtpick_extent(
- xfs_mount_t *mp, /* file system mount point */
- xfs_trans_t *tp, /* transaction pointer */
- xfs_rtxlen_t len, /* allocation length (rtextents) */
- xfs_rtxnum_t *pick) /* result rt extent */
-{
- xfs_rtxnum_t b; /* result rtext */
- int log2; /* log of sequence number */
- uint64_t resid; /* residual after log removed */
- uint64_t seq; /* sequence number of file creation */
- uint64_t *seqp; /* pointer to seqno in inode */
+ xfs_mount_t *mp, /* file system mount point */
+ xfs_trans_t *tp, /* transaction pointer */
- xfs_extlen_t len, /* allocation length (rtextents) */
- xfs_rtblock_t *pick) /* result rt extent */
++ xfs_rtxlen_t len, /* allocation length (rtextents) */
++ xfs_rtxnum_t *pick) /* result rt extent */
+ {
- xfs_rtblock_t b; /* result block */
++ xfs_rtxnum_t b; /* result rtext */
+ int log2; /* log of sequence number */
+ uint64_t resid; /* residual after log removed */
+ uint64_t seq; /* sequence number of file creation */
+ struct timespec64 ts; /* temporary timespec64 storage */
ASSERT(xfs_isilocked(mp->m_rbmip, XFS_ILOCK_EXCL));
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next reply other threads:[~2023-10-31 0:42 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-31 0:41 Stephen Rothwell [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-03-30 22:00 linux-next: manual merge of the xfs tree with Linus' tree Stephen Rothwell
2022-01-17 22:30 Stephen Rothwell
2022-01-18 18:17 ` Darrick J. Wong
2019-07-16 23:36 Stephen Rothwell
2018-10-31 0:22 Stephen Rothwell
2018-10-31 1:05 ` Dave Chinner
2018-06-05 0:34 Stephen Rothwell
2018-06-05 0:38 ` Stephen Rothwell
2018-06-05 0:59 ` Dave Chinner
2018-06-05 1:13 ` Andreas Grünbacher
2018-06-05 1:25 ` Stephen Rothwell
2017-12-21 22:50 Stephen Rothwell
2017-12-21 23:01 ` Darrick J. Wong
2016-07-21 1:07 Stephen Rothwell
2016-07-21 1:35 ` Dave Chinner
2015-04-20 2:24 Stephen Rothwell
2012-01-03 1:06 Stephen Rothwell
2012-01-03 1:34 ` Dave Chinner
2011-09-15 2:30 Stephen Rothwell
2011-09-15 11:05 ` Christoph Hellwig
2011-03-28 1:21 Stephen Rothwell
2009-08-18 0:12 Stephen Rothwell
2009-08-18 6:49 ` Felix Blyakher
2009-08-18 7:17 ` Stephen Rothwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231031114158.548ff433@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=brauner@kernel.org \
--cc=david@fromorbit.com \
--cc=dchinner@redhat.com \
--cc=djwong@kernel.org \
--cc=jlayton@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).