* [PATCH] xfs: require both realtime inodes to mount
@ 2018-12-14 4:29 Darrick J. Wong
2018-12-14 16:08 ` Bill O'Donnell
0 siblings, 1 reply; 2+ messages in thread
From: Darrick J. Wong @ 2018-12-14 4:29 UTC (permalink / raw)
To: xfs; +Cc: Bill O'Donnell, Eric Sandeen
From: Darrick J. Wong <darrick.wong@oracle.com>
Since mkfs always formats the filesystem with the realtime bitmap and
summary inodes immediately after the root directory, we should expect
that both of them are present and loadable, even if there isn't a
realtime volume attached. There's no reason to skip this if rbmino ==
NULLFSINO; in fact, this causes an immediate crash if the there /is/ a
realtime volume and someone writes to it.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
fs/xfs/xfs_rtalloc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c
index aefd63d46397..afe4d29f7ab4 100644
--- a/fs/xfs/xfs_rtalloc.c
+++ b/fs/xfs/xfs_rtalloc.c
@@ -1206,13 +1206,11 @@ xfs_rtmount_inodes(
xfs_sb_t *sbp;
sbp = &mp->m_sb;
- if (sbp->sb_rbmino == NULLFSINO)
- return 0;
error = xfs_iget(mp, NULL, sbp->sb_rbmino, 0, 0, &mp->m_rbmip);
if (error)
return error;
ASSERT(mp->m_rbmip != NULL);
- ASSERT(sbp->sb_rsumino != NULLFSINO);
+
error = xfs_iget(mp, NULL, sbp->sb_rsumino, 0, 0, &mp->m_rsumip);
if (error) {
xfs_irele(mp->m_rbmip);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] xfs: require both realtime inodes to mount
2018-12-14 4:29 [PATCH] xfs: require both realtime inodes to mount Darrick J. Wong
@ 2018-12-14 16:08 ` Bill O'Donnell
0 siblings, 0 replies; 2+ messages in thread
From: Bill O'Donnell @ 2018-12-14 16:08 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: xfs, Eric Sandeen
On Thu, Dec 13, 2018 at 08:29:32PM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
>
> Since mkfs always formats the filesystem with the realtime bitmap and
> summary inodes immediately after the root directory, we should expect
> that both of them are present and loadable, even if there isn't a
> realtime volume attached. There's no reason to skip this if rbmino ==
> NULLFSINO; in fact, this causes an immediate crash if the there /is/ a
> realtime volume and someone writes to it.
>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> ---
Looks fine.
Reviewed-by: Bill O'Donnell <billodo@redhat.com>
> fs/xfs/xfs_rtalloc.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c
> index aefd63d46397..afe4d29f7ab4 100644
> --- a/fs/xfs/xfs_rtalloc.c
> +++ b/fs/xfs/xfs_rtalloc.c
> @@ -1206,13 +1206,11 @@ xfs_rtmount_inodes(
> xfs_sb_t *sbp;
>
> sbp = &mp->m_sb;
> - if (sbp->sb_rbmino == NULLFSINO)
> - return 0;
> error = xfs_iget(mp, NULL, sbp->sb_rbmino, 0, 0, &mp->m_rbmip);
> if (error)
> return error;
> ASSERT(mp->m_rbmip != NULL);
> - ASSERT(sbp->sb_rsumino != NULLFSINO);
> +
> error = xfs_iget(mp, NULL, sbp->sb_rsumino, 0, 0, &mp->m_rsumip);
> if (error) {
> xfs_irele(mp->m_rbmip);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-12-14 16:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-14 4:29 [PATCH] xfs: require both realtime inodes to mount Darrick J. Wong
2018-12-14 16:08 ` Bill O'Donnell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.