* [PATCH v1] man/man2/quotactl.2: tfix @ 2026-05-16 17:12 Alejandro Colomar 2026-05-18 10:20 ` Jan Kara 0 siblings, 1 reply; 7+ messages in thread From: Alejandro Colomar @ 2026-05-16 17:12 UTC (permalink / raw) To: linux-man, Jan Kara; +Cc: Alejandro Colomar, Petr Gajdos, Jan Blunck It seems most likely that this was a typo, and that Q_XQUOTAON was meant. Fixes: 1eeddf25 (2010-06-16; "quotactl.2: Major updates") Cc: Jan Kara <jack@suse.cz> Cc: Petr Gajdos <pgajdos@suse.cz> Cc: Jan Blunck <jblunck@novell.com> Signed-off-by: Alejandro Colomar <alx@kernel.org> --- Hi Jan, I'm working on this page, and found what seems to be a typo. I'd like you to confirm, in case I'm missing something. Have a lovely day! Alex man/man2/quotactl.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/man2/quotactl.2 b/man/man2/quotactl.2 index ef050714..bf361409 100644 --- a/man/man2/quotactl.2 +++ b/man/man2/quotactl.2 @@ -130,7 +130,7 @@ .SH DESCRIPTION .B Q_XQUOTAOFF Turn off quotas for an XFS filesystem. As with -.BR Q_QUOTAON (2const), +.BR Q_XQUOTAON (2const), XFS filesystems expect a pointer to an .I "unsigned int" that specifies whether quota accounting and/or limit enforcement need Range-diff against v0: -: -------- > 1: 9d328eab man/man2/quotactl.2: tfix -- 2.53.0 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v1] man/man2/quotactl.2: tfix 2026-05-16 17:12 [PATCH v1] man/man2/quotactl.2: tfix Alejandro Colomar @ 2026-05-18 10:20 ` Jan Kara 2026-05-18 10:27 ` Alejandro Colomar 2026-05-18 12:51 ` Alejandro Colomar 0 siblings, 2 replies; 7+ messages in thread From: Jan Kara @ 2026-05-18 10:20 UTC (permalink / raw) To: Alejandro Colomar; +Cc: linux-man, Jan Kara, Petr Gajdos, Jan Blunck On Sat 16-05-26 19:12:08, Alejandro Colomar wrote: > It seems most likely that this was a typo, and that Q_XQUOTAON was > meant. > > Fixes: 1eeddf25 (2010-06-16; "quotactl.2: Major updates") > Cc: Jan Kara <jack@suse.cz> > Cc: Petr Gajdos <pgajdos@suse.cz> > Cc: Jan Blunck <jblunck@novell.com> > Signed-off-by: Alejandro Colomar <alx@kernel.org> Right. Thanks for the fix. Feel free to add: Reviewed-by: Jan Kara <jack@suse.cz> Honza > --- > > Hi Jan, > > I'm working on this page, and found what seems to be a typo. I'd like > you to confirm, in case I'm missing something. > > > Have a lovely day! > Alex > > man/man2/quotactl.2 | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/man/man2/quotactl.2 b/man/man2/quotactl.2 > index ef050714..bf361409 100644 > --- a/man/man2/quotactl.2 > +++ b/man/man2/quotactl.2 > @@ -130,7 +130,7 @@ .SH DESCRIPTION > .B Q_XQUOTAOFF > Turn off quotas for an XFS filesystem. > As with > -.BR Q_QUOTAON (2const), > +.BR Q_XQUOTAON (2const), > XFS filesystems expect a pointer to an > .I "unsigned int" > that specifies whether quota accounting and/or limit enforcement need > > Range-diff against v0: > -: -------- > 1: 9d328eab man/man2/quotactl.2: tfix > -- > 2.53.0 > -- Jan Kara <jack@suse.com> SUSE Labs, CR ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1] man/man2/quotactl.2: tfix 2026-05-18 10:20 ` Jan Kara @ 2026-05-18 10:27 ` Alejandro Colomar 2026-05-18 12:51 ` Alejandro Colomar 1 sibling, 0 replies; 7+ messages in thread From: Alejandro Colomar @ 2026-05-18 10:27 UTC (permalink / raw) To: Jan Kara; +Cc: linux-man, Petr Gajdos, Jan Blunck [-- Attachment #1: Type: text/plain, Size: 631 bytes --] Hi Jan, On 2026-05-18T12:20:50+0200, Jan Kara wrote: > On Sat 16-05-26 19:12:08, Alejandro Colomar wrote: > > It seems most likely that this was a typo, and that Q_XQUOTAON was > > meant. > > > > Fixes: 1eeddf25 (2010-06-16; "quotactl.2: Major updates") > > Cc: Jan Kara <jack@suse.cz> > > Cc: Petr Gajdos <pgajdos@suse.cz> > > Cc: Jan Blunck <jblunck@novell.com> > > Signed-off-by: Alejandro Colomar <alx@kernel.org> > > Right. Thanks for the fix. Feel free to add: > > Reviewed-by: Jan Kara <jack@suse.cz> Thanks! Added and pushed. Have a lovely day! Alex -- <https://www.alejandro-colomar.es> [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1] man/man2/quotactl.2: tfix 2026-05-18 10:20 ` Jan Kara 2026-05-18 10:27 ` Alejandro Colomar @ 2026-05-18 12:51 ` Alejandro Colomar 2026-05-18 15:05 ` Jan Kara 1 sibling, 1 reply; 7+ messages in thread From: Alejandro Colomar @ 2026-05-18 12:51 UTC (permalink / raw) To: Jan Kara; +Cc: linux-man, Petr Gajdos, Jan Blunck [-- Attachment #1: Type: text/plain, Size: 1456 bytes --] Hi Jan, On 2026-05-18T12:20:50+0200, Jan Kara wrote: > On Sat 16-05-26 19:12:08, Alejandro Colomar wrote: > > It seems most likely that this was a typo, and that Q_XQUOTAON was > > meant. > > > > Fixes: 1eeddf25 (2010-06-16; "quotactl.2: Major updates") > > Cc: Jan Kara <jack@suse.cz> > > Cc: Petr Gajdos <pgajdos@suse.cz> > > Cc: Jan Blunck <jblunck@novell.com> > > Signed-off-by: Alejandro Colomar <alx@kernel.org> > > Right. Thanks for the fix. Feel free to add: I have more questions about quotactl(2). In the operations that ignore the 'id' argument, am I right to assume that QCMD() is unnecessary? My assumption is because if there's no user or group ID to be used, it also doesn't make sense to specify whether we want to affect a user or a group. So, for example, Q_QUOTAOFF would have the following synopsis: int quotactl(Q_QUOTAOFF, const char *_Nullable special, 0, NULL); While Q_QUOTAON would have the following one: int quotactl(QCMD(Q_QUOTAON, type), const char *_Nullable special, int fmt, caddr_t quota_path); Is that correct? Also, I wonder why caddr_t was used at all, instead of void*. It seems to unnecessarily require a cast, which could have been avoided with void*. In quotactl_fd(), since we need to use syscall(2), which is variadic, I'll document the correct pointer types, instead of caddr_t*. Have a lovely day! Alex -- <https://www.alejandro-colomar.es> [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1] man/man2/quotactl.2: tfix 2026-05-18 12:51 ` Alejandro Colomar @ 2026-05-18 15:05 ` Jan Kara 2026-05-18 15:12 ` Alejandro Colomar 2026-05-18 15:17 ` Why is caddr_t used in quotactl(2)? Alejandro Colomar 0 siblings, 2 replies; 7+ messages in thread From: Jan Kara @ 2026-05-18 15:05 UTC (permalink / raw) To: Alejandro Colomar; +Cc: Jan Kara, linux-man, Petr Gajdos, Jan Blunck Hi Alejandro! On Mon 18-05-26 14:51:45, Alejandro Colomar wrote: > On 2026-05-18T12:20:50+0200, Jan Kara wrote: > > On Sat 16-05-26 19:12:08, Alejandro Colomar wrote: > > > It seems most likely that this was a typo, and that Q_XQUOTAON was > > > meant. > > > > > > Fixes: 1eeddf25 (2010-06-16; "quotactl.2: Major updates") > > > Cc: Jan Kara <jack@suse.cz> > > > Cc: Petr Gajdos <pgajdos@suse.cz> > > > Cc: Jan Blunck <jblunck@novell.com> > > > Signed-off-by: Alejandro Colomar <alx@kernel.org> > > > > Right. Thanks for the fix. Feel free to add: > > I have more questions about quotactl(2). In the operations that ignore > the 'id' argument, am I right to assume that QCMD() is unnecessary? My > assumption is because if there's no user or group ID to be used, it also > doesn't make sense to specify whether we want to affect a user or a > group. > > So, for example, Q_QUOTAOFF would have the following synopsis: > > int quotactl(Q_QUOTAOFF, const char *_Nullable special, 0, NULL); > > While Q_QUOTAON would have the following one: > > int quotactl(QCMD(Q_QUOTAON, type), const char *_Nullable special, > int fmt, caddr_t quota_path); > > Is that correct? No, QCMD() is always required. For example for Q_QUOTAOFF you still need to tell whether you want to disable user or group quotas. And even if the type would not matter for some quotactl, QCMD still does a mangling to the passed arguments that is expected by the kernel (QCMD is ((cmd) << SUBCMDSHIFT) | ((type) & SUBCMDMASK)). > Also, I wonder why caddr_t was used at all, instead of void*. It seems > to unnecessarily require a cast, which could have been avoided with > void*. In quotactl_fd(), since we need to use syscall(2), which is > variadic, I'll document the correct pointer types, instead of caddr_t*. For this I don't have a good answer. It was like that for ages... I guess you can ask glibc guys - the kernel uses void * but glibc uses caddr_t. Honza -- Jan Kara <jack@suse.com> SUSE Labs, CR ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v1] man/man2/quotactl.2: tfix 2026-05-18 15:05 ` Jan Kara @ 2026-05-18 15:12 ` Alejandro Colomar 2026-05-18 15:17 ` Why is caddr_t used in quotactl(2)? Alejandro Colomar 1 sibling, 0 replies; 7+ messages in thread From: Alejandro Colomar @ 2026-05-18 15:12 UTC (permalink / raw) To: Jan Kara; +Cc: linux-man, Petr Gajdos [-- Attachment #1: Type: text/plain, Size: 1658 bytes --] Hi Jan! On 2026-05-18T17:05:59+0200, Jan Kara wrote: > > I have more questions about quotactl(2). In the operations that ignore > > the 'id' argument, am I right to assume that QCMD() is unnecessary? My > > assumption is because if there's no user or group ID to be used, it also > > doesn't make sense to specify whether we want to affect a user or a > > group. > > > > So, for example, Q_QUOTAOFF would have the following synopsis: > > > > int quotactl(Q_QUOTAOFF, const char *_Nullable special, 0, NULL); > > > > While Q_QUOTAON would have the following one: > > > > int quotactl(QCMD(Q_QUOTAON, type), const char *_Nullable special, > > int fmt, caddr_t quota_path); > > > > Is that correct? > > No, QCMD() is always required. For example for Q_QUOTAOFF you still need to > tell whether you want to disable user or group quotas. And even if the type > would not matter for some quotactl, QCMD still does a mangling to the > passed arguments that is expected by the kernel (QCMD is ((cmd) << > SUBCMDSHIFT) | ((type) & SUBCMDMASK)). Ahh, thanks! Makes sense. > > Also, I wonder why caddr_t was used at all, instead of void*. It seems > > to unnecessarily require a cast, which could have been avoided with > > void*. In quotactl_fd(), since we need to use syscall(2), which is > > variadic, I'll document the correct pointer types, instead of caddr_t*. > > For this I don't have a good answer. It was like that for ages... I guess > you can ask glibc guys - the kernel uses void * but glibc uses caddr_t. Hmmmm. I'll ask; thanks! Cheers, Alex -- <https://www.alejandro-colomar.es> [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Why is caddr_t used in quotactl(2)? 2026-05-18 15:05 ` Jan Kara 2026-05-18 15:12 ` Alejandro Colomar @ 2026-05-18 15:17 ` Alejandro Colomar 1 sibling, 0 replies; 7+ messages in thread From: Alejandro Colomar @ 2026-05-18 15:17 UTC (permalink / raw) To: libc-help; +Cc: Jan Kara, linux-man, Petr Gajdos [-- Attachment #1: Type: text/plain, Size: 949 bytes --] [looping libc-help@] Hi all, On 2026-05-18T17:05:59+0200, Jan Kara wrote: > Hi Alejandro! > > On Mon 18-05-26 14:51:45, Alejandro Colomar wrote: > > Also, I wonder why caddr_t was used at all, instead of void*. It seems > > to unnecessarily require a cast, which could have been avoided with > > void*. In quotactl_fd(), since we need to use syscall(2), which is > > variadic, I'll document the correct pointer types, instead of caddr_t*. > > For this I don't have a good answer. It was like that for ages... I guess > you can ask glibc guys - the kernel uses void * but glibc uses caddr_t. Does anyone know why glibc uses caddr_t in quotactl(2)? It seems to me that void* would be obviously better, by not needing a cast. - Why was it added in the first place, given the kernel uses void* internally? - Can we change it now to be void*? Have a lovely day! Alex -- <https://www.alejandro-colomar.es> [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-05-18 15:17 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-05-16 17:12 [PATCH v1] man/man2/quotactl.2: tfix Alejandro Colomar 2026-05-18 10:20 ` Jan Kara 2026-05-18 10:27 ` Alejandro Colomar 2026-05-18 12:51 ` Alejandro Colomar 2026-05-18 15:05 ` Jan Kara 2026-05-18 15:12 ` Alejandro Colomar 2026-05-18 15:17 ` Why is caddr_t used in quotactl(2)? Alejandro Colomar
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox