diff mbox series

[12/17] xfs: no quota support with internal rtdev

Message ID 20250312064541.664334-13-hch@lst.de (mailing list archive)
State New
Headers show
Series [01/17] xfs/177: force a small file system size | expand

Commit Message

Christoph Hellwig March 12, 2025, 6:45 a.m. UTC
Same as regular zoned, but the previous check didn't work.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 common/xfs | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Darrick J. Wong March 12, 2025, 8:25 p.m. UTC | #1
On Wed, Mar 12, 2025 at 07:45:04AM +0100, Christoph Hellwig wrote:
> Same as regular zoned, but the previous check didn't work.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  common/xfs | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/common/xfs b/common/xfs
> index a18b721eb5cf..3f9119d5ef65 100644
> --- a/common/xfs
> +++ b/common/xfs
> @@ -2210,7 +2210,10 @@ _xfs_scratch_supports_rtquota() {
>  # can check that quickly, and we make the bold assumption that the same will
>  # apply to any scratch fs that might be created.
>  _require_xfs_rtquota_if_rtdev() {
> -	test "$USE_EXTERNAL" = "yes" || return
> +	if [ "$USE_EXTERNAL" != "yes" ]; then
> +		xfs_info "$TEST_DIR" | grep -q 'realtime.*internal' &&
> +			_notrun "Quota on internal rt device not supported"

Huh, I wonder if we should've allowed internal non-zoned rt devices.
It might've made the whole "we want 2MB blocksize on pmem" mess a little
less unpalatable.

Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D

> +	fi
>  
>  	if [ -n "$TEST_RTDEV$SCRATCH_RTDEV" ]; then
>  		_xfs_kmod_supports_rtquota || \
> -- 
> 2.45.2
> 
>
Christoph Hellwig March 13, 2025, 7:30 a.m. UTC | #2
On Wed, Mar 12, 2025 at 01:25:11PM -0700, Darrick J. Wong wrote:
> >  # apply to any scratch fs that might be created.
> >  _require_xfs_rtquota_if_rtdev() {
> > -	test "$USE_EXTERNAL" = "yes" || return
> > +	if [ "$USE_EXTERNAL" != "yes" ]; then
> > +		xfs_info "$TEST_DIR" | grep -q 'realtime.*internal' &&
> > +			_notrun "Quota on internal rt device not supported"
> 
> Huh, I wonder if we should've allowed internal non-zoned rt devices.
> It might've made the whole "we want 2MB blocksize on pmem" mess a little
> less unpalatable.

The code should be able to easily support it, but we'd need a new
feature flag to look for the rtstart value.   We can probably just add
that feature the next time we add a somewhat relevant feature flag.

Hopefuly until then we'll support quotas on zoned so this check can
go away.  Of maybe we just need to find a better way to probe for
quota support in general as the checks in xfstests are a bit of a
mess.
diff mbox series

Patch

diff --git a/common/xfs b/common/xfs
index a18b721eb5cf..3f9119d5ef65 100644
--- a/common/xfs
+++ b/common/xfs
@@ -2210,7 +2210,10 @@  _xfs_scratch_supports_rtquota() {
 # can check that quickly, and we make the bold assumption that the same will
 # apply to any scratch fs that might be created.
 _require_xfs_rtquota_if_rtdev() {
-	test "$USE_EXTERNAL" = "yes" || return
+	if [ "$USE_EXTERNAL" != "yes" ]; then
+		xfs_info "$TEST_DIR" | grep -q 'realtime.*internal' &&
+			_notrun "Quota on internal rt device not supported"
+	fi
 
 	if [ -n "$TEST_RTDEV$SCRATCH_RTDEV" ]; then
 		_xfs_kmod_supports_rtquota || \