* [PATCH] generic/620: add '-J block64' mkfs option for ocfs2
@ 2025-01-06 14:01 Su Yue
2025-01-06 16:30 ` Christoph Hellwig
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Su Yue @ 2025-01-06 14:01 UTC (permalink / raw)
To: fstests; +Cc: ocfs2-devel, Su Yue
mkfs.ocfs2 is using 32bit journal as default.
For 16T size device support, '-J block64' should be used.
Signed-off-by: Su Yue <glass.su@suse.com>
---
tests/generic/620 | 3 +++
1 file changed, 3 insertions(+)
diff --git a/tests/generic/620 b/tests/generic/620
index 3f1ce45a55fd..60e5a2cacdda 100755
--- a/tests/generic/620
+++ b/tests/generic/620
@@ -41,6 +41,9 @@ sectors=$((2*1024*1024*1024*17))
chunk_size=128
_dmhugedisk_init $sectors $chunk_size
+
+[ "$FSTYP" = "ocfs2" ] && MKFS_OPTIONS="$MKFS_OPTIONS -J block64"
+
_mkfs_dev $DMHUGEDISK_DEV
_mount $DMHUGEDISK_DEV $SCRATCH_MNT || _fail "mount failed for $DMHUGEDISK_DEV $SCRATCH_MNT"
testfile=$SCRATCH_MNT/testfile-$seq
--
2.47.1
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH] generic/620: add '-J block64' mkfs option for ocfs2
2025-01-06 14:01 [PATCH] generic/620: add '-J block64' mkfs option for ocfs2 Su Yue
@ 2025-01-06 16:30 ` Christoph Hellwig
2025-01-07 2:50 ` Glass Su
2025-01-06 16:39 ` David Disseldorp
2025-01-07 2:12 ` Darrick J. Wong
2 siblings, 1 reply; 8+ messages in thread
From: Christoph Hellwig @ 2025-01-06 16:30 UTC (permalink / raw)
To: Su Yue; +Cc: fstests, ocfs2-devel
On Mon, Jan 06, 2025 at 10:01:04PM +0800, Su Yue wrote:
> mkfs.ocfs2 is using 32bit journal as default.
> For 16T size device support, '-J block64' should be used.
Hard coding this into a specific test is weird. I would expect
mkfs to pick the right one, but maybe the maintainers have a good
reason for not doing that?
But if not you probably want to force it in your config file or
we need a workaround in _try_mkfs_dev.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] generic/620: add '-J block64' mkfs option for ocfs2
2025-01-06 16:30 ` Christoph Hellwig
@ 2025-01-07 2:50 ` Glass Su
0 siblings, 0 replies; 8+ messages in thread
From: Glass Su @ 2025-01-07 2:50 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: fstests, ocfs2-devel
> On Jan 7, 2025, at 00:30, Christoph Hellwig <hch@infradead.org> wrote:
>
> On Mon, Jan 06, 2025 at 10:01:04PM +0800, Su Yue wrote:
>> mkfs.ocfs2 is using 32bit journal as default.
>> For 16T size device support, '-J block64' should be used.
>
> Hard coding this into a specific test is weird. I would expect
> mkfs to pick the right one, but maybe the maintainers have a good
> reason for not doing that?
>
Sounds more reasonable. 64bit journal support of ocfs2 was added in
2008, 17 gears agao...
—
Su
> But if not you probably want to force it in your config file or
> we need a workaround in _try_mkfs_dev.
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] generic/620: add '-J block64' mkfs option for ocfs2
2025-01-06 14:01 [PATCH] generic/620: add '-J block64' mkfs option for ocfs2 Su Yue
2025-01-06 16:30 ` Christoph Hellwig
@ 2025-01-06 16:39 ` David Disseldorp
2025-01-07 2:45 ` Glass Su
2025-01-07 2:12 ` Darrick J. Wong
2 siblings, 1 reply; 8+ messages in thread
From: David Disseldorp @ 2025-01-06 16:39 UTC (permalink / raw)
To: Su Yue; +Cc: fstests, ocfs2-devel
Hi,
On Mon, 6 Jan 2025 22:01:04 +0800, Su Yue wrote:
> mkfs.ocfs2 is using 32bit journal as default.
> For 16T size device support, '-J block64' should be used.
>
> Signed-off-by: Su Yue <glass.su@suse.com>
> ---
> tests/generic/620 | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/tests/generic/620 b/tests/generic/620
> index 3f1ce45a55fd..60e5a2cacdda 100755
> --- a/tests/generic/620
> +++ b/tests/generic/620
> @@ -41,6 +41,9 @@ sectors=$((2*1024*1024*1024*17))
> chunk_size=128
>
> _dmhugedisk_init $sectors $chunk_size
> +
> +[ "$FSTYP" = "ocfs2" ] && MKFS_OPTIONS="$MKFS_OPTIONS -J block64"
Makes sense, although as Christoph mentioned, a less test-specific
approach might be a better. E.g. _require_scratch_16T_support could skip
if block64 isn't configured, similar to ext4 (assuming tunefs.ocfs2
provides a way to query for it, which I don't see at first glance).
Cheers, David
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] generic/620: add '-J block64' mkfs option for ocfs2
2025-01-06 16:39 ` David Disseldorp
@ 2025-01-07 2:45 ` Glass Su
0 siblings, 0 replies; 8+ messages in thread
From: Glass Su @ 2025-01-07 2:45 UTC (permalink / raw)
To: David Disseldorp; +Cc: fstests, ocfs2-devel
> On Jan 7, 2025, at 00:39, David Disseldorp <ddiss@suse.de> wrote:
>
> Hi,
>
> On Mon, 6 Jan 2025 22:01:04 +0800, Su Yue wrote:
>
>> mkfs.ocfs2 is using 32bit journal as default.
>> For 16T size device support, '-J block64' should be used.
>>
>> Signed-off-by: Su Yue <glass.su@suse.com>
>> ---
>> tests/generic/620 | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/tests/generic/620 b/tests/generic/620
>> index 3f1ce45a55fd..60e5a2cacdda 100755
>> --- a/tests/generic/620
>> +++ b/tests/generic/620
>> @@ -41,6 +41,9 @@ sectors=$((2*1024*1024*1024*17))
>> chunk_size=128
>>
>> _dmhugedisk_init $sectors $chunk_size
>> +
>> +[ "$FSTYP" = "ocfs2" ] && MKFS_OPTIONS="$MKFS_OPTIONS -J block64"
>
> Makes sense, although as Christoph mentioned, a less test-specific
> approach might be a better. E.g. _require_scratch_16T_support could skip
My brain is clearer after one night sleep. As Christoph said, I think it’s problem of mkfs.ocfs2.
Let me drop this patch. Thanks for your review.
—
Su
> if block64 isn't configured, similar to ext4 (assuming tunefs.ocfs2
> provides a way to query for it, which I don't see at first glance).
>
> Cheers, David
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] generic/620: add '-J block64' mkfs option for ocfs2
2025-01-06 14:01 [PATCH] generic/620: add '-J block64' mkfs option for ocfs2 Su Yue
2025-01-06 16:30 ` Christoph Hellwig
2025-01-06 16:39 ` David Disseldorp
@ 2025-01-07 2:12 ` Darrick J. Wong
2025-01-07 2:42 ` Glass Su
2 siblings, 1 reply; 8+ messages in thread
From: Darrick J. Wong @ 2025-01-07 2:12 UTC (permalink / raw)
To: Su Yue; +Cc: fstests, ocfs2-devel
On Mon, Jan 06, 2025 at 10:01:04PM +0800, Su Yue wrote:
> mkfs.ocfs2 is using 32bit journal as default.
> For 16T size device support, '-J block64' should be used.
>
> Signed-off-by: Su Yue <glass.su@suse.com>
> ---
> tests/generic/620 | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/tests/generic/620 b/tests/generic/620
> index 3f1ce45a55fd..60e5a2cacdda 100755
> --- a/tests/generic/620
> +++ b/tests/generic/620
> @@ -41,6 +41,9 @@ sectors=$((2*1024*1024*1024*17))
> chunk_size=128
>
> _dmhugedisk_init $sectors $chunk_size
> +
> +[ "$FSTYP" = "ocfs2" ] && MKFS_OPTIONS="$MKFS_OPTIONS -J block64"
Won't mkfs.ocfs2 turn on block64 on a > 16T volume without prompting?
--D
> +
> _mkfs_dev $DMHUGEDISK_DEV
> _mount $DMHUGEDISK_DEV $SCRATCH_MNT || _fail "mount failed for $DMHUGEDISK_DEV $SCRATCH_MNT"
> testfile=$SCRATCH_MNT/testfile-$seq
> --
> 2.47.1
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] generic/620: add '-J block64' mkfs option for ocfs2
2025-01-07 2:12 ` Darrick J. Wong
@ 2025-01-07 2:42 ` Glass Su
2025-01-07 11:38 ` Joseph Qi
0 siblings, 1 reply; 8+ messages in thread
From: Glass Su @ 2025-01-07 2:42 UTC (permalink / raw)
To: Darrick J. Wong, Joseph Qi, Mark Fasheh; +Cc: fstests, ocfs2-devel
> On Jan 7, 2025, at 10:12, Darrick J. Wong <djwong@kernel.org> wrote:
>
> On Mon, Jan 06, 2025 at 10:01:04PM +0800, Su Yue wrote:
>> mkfs.ocfs2 is using 32bit journal as default.
>> For 16T size device support, '-J block64' should be used.
>>
>> Signed-off-by: Su Yue <glass.su@suse.com>
>> ---
>> tests/generic/620 | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/tests/generic/620 b/tests/generic/620
>> index 3f1ce45a55fd..60e5a2cacdda 100755
>> --- a/tests/generic/620
>> +++ b/tests/generic/620
>> @@ -41,6 +41,9 @@ sectors=$((2*1024*1024*1024*17))
>> chunk_size=128
>>
>> _dmhugedisk_init $sectors $chunk_size
>> +
>> +[ "$FSTYP" = "ocfs2" ] && MKFS_OPTIONS="$MKFS_OPTIONS -J block64"
>
> Won't mkfs.ocfs2 turn on block64 on a > 16T volume without prompting?
>
It won’t. Only error will be printed:
ERROR: jbd can only store block numbers in 32 bits. /dev/mapper/huge-test.620 can hold 4563402752 blocks
which overflows this limit. If you have a new enough Ocfs2 with JBD2 support, you can try formatting with the "-Jblock64" option to turn on support for this size block device.
It’s 2025 now. Maybe it’s time to make mkfs.ocfs2 turn on block64 if device size > 16T.
Maintainers may know some stories. Joseph?
—
Su
> --D
>
>> +
>> _mkfs_dev $DMHUGEDISK_DEV
>> _mount $DMHUGEDISK_DEV $SCRATCH_MNT || _fail "mount failed for $DMHUGEDISK_DEV $SCRATCH_MNT"
>> testfile=$SCRATCH_MNT/testfile-$seq
>> --
>> 2.47.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] generic/620: add '-J block64' mkfs option for ocfs2
2025-01-07 2:42 ` Glass Su
@ 2025-01-07 11:38 ` Joseph Qi
0 siblings, 0 replies; 8+ messages in thread
From: Joseph Qi @ 2025-01-07 11:38 UTC (permalink / raw)
To: Glass Su, Darrick J. Wong, Mark Fasheh; +Cc: fstests, ocfs2-devel
On 2025/1/7 10:42, Glass Su wrote:
>
>
>> On Jan 7, 2025, at 10:12, Darrick J. Wong <djwong@kernel.org> wrote:
>>
>> On Mon, Jan 06, 2025 at 10:01:04PM +0800, Su Yue wrote:
>>> mkfs.ocfs2 is using 32bit journal as default.
>>> For 16T size device support, '-J block64' should be used.
>>>
>>> Signed-off-by: Su Yue <glass.su@suse.com>
>>> ---
>>> tests/generic/620 | 3 +++
>>> 1 file changed, 3 insertions(+)
>>>
>>> diff --git a/tests/generic/620 b/tests/generic/620
>>> index 3f1ce45a55fd..60e5a2cacdda 100755
>>> --- a/tests/generic/620
>>> +++ b/tests/generic/620
>>> @@ -41,6 +41,9 @@ sectors=$((2*1024*1024*1024*17))
>>> chunk_size=128
>>>
>>> _dmhugedisk_init $sectors $chunk_size
>>> +
>>> +[ "$FSTYP" = "ocfs2" ] && MKFS_OPTIONS="$MKFS_OPTIONS -J block64"
>>
>> Won't mkfs.ocfs2 turn on block64 on a > 16T volume without prompting?
>>
> It won’t. Only error will be printed:
>
> ERROR: jbd can only store block numbers in 32 bits. /dev/mapper/huge-test.620 can hold 4563402752 blocks
> which overflows this limit. If you have a new enough Ocfs2 with JBD2 support, you can try formatting with the "-Jblock64" option to turn on support for this size block device.
>
> It’s 2025 now. Maybe it’s time to make mkfs.ocfs2 turn on block64 if device size > 16T.
>
> Maintainers may know some stories. Joseph?
>
AFAIK, standard 32-bit journal is the default journal format for ocfs2
since the beginning.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-01-07 11:38 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-06 14:01 [PATCH] generic/620: add '-J block64' mkfs option for ocfs2 Su Yue
2025-01-06 16:30 ` Christoph Hellwig
2025-01-07 2:50 ` Glass Su
2025-01-06 16:39 ` David Disseldorp
2025-01-07 2:45 ` Glass Su
2025-01-07 2:12 ` Darrick J. Wong
2025-01-07 2:42 ` Glass Su
2025-01-07 11:38 ` Joseph Qi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox