[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: 1770750865978919.jpg (178 KB, 1065x862)
178 KB JPG
previous: >>108695654

#define __NR_quotactl                179
#define __NR_quotactl_fd 443


tl;dr:
manage disk quotas

this is a very rare case of a syscall i've never heard of before in my life, but which genuinely seems useful, even to the average user. so i'm pretty excited to bring this one up. maybe i can help somebody out with it!

it looks like there's slightly different logic for handling xfs filesystems. i wonder why for that one in particular? i guess maybe it's the only one with similar functionality already implemented (its XQM)? that could explain it

the _fd version also seems pretty useful
   quotactl() versus quotactl_fd()
The original quotactl() variant of this system call requires
specifying the block device containing the filesystem to operate
on. This makes it impossible to use in cases where the filesystem
has no backing block device (e.g., tmpfs). Even when the block
device does exist, it might be difficult to locate (requires
scanning /proc/self/mounts and even some filesystem-specific
parsing in the case of, for example, bcachefs). quotactl_fd()
instead works on the mount point, which avoids this limitation and
is simpler to use (since the filesystem to manipulate is typically
specified by its mount point anyway).

so that's kinda nice! it doesn't feel like API bloat for no reason

all in all, i would say i'm pretty happy with today's lineup. what do you think, anon?

relevant resources:
man man

man syscalls

https://man7.org/linux/man-pages/
https://linux.die.net/man/
https://elixir.bootlin.com/linux/
https://elixir.bootlin.com/musl/
https://elixir.bootlin.com/glibc/
>>
bampu
>>
>use the QCMD(subop, type) macro
incredible, waow. I like C, but this stuff is so funny. Is the result an lvalue? who knows?! look at the code examples and pray that they're sane and cover your use case..
>>
>>108703313
just look at the source :^)
>>
>>108704613
It's over, proprietary code is finished
>>
File: 1753486374917.jpg (1.84 MB, 2832x2072)
1.84 MB JPG
>>108701257
Aztec bullshit.
>>
>>108703313
dumbass
>>
bampu
>>
File: 200w.gif (1.29 MB, 200x180)
1.29 MB GIF
what's a quota and why should i want to manage it?



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.