bcachefs-tools/include/linux
Chris Webb ddc7161531 bcachefs-tools: Use sysinfo(2) directly to implement si_meminfo()
Use a single sysinfo(2) call to fill out struct sysinfo instead of
multiple libc sysconf(3) requests, which will only make sysinfo(2) calls
internally anyway. This also enables us to access other struct sysinfo
fields, not just the three filled-out previously.

As we provide our own definition of struct sysinfo in include/linux/mm.h
to match the kernel, which is not guaranteed to align with the definition
libc provides in <sys/sysinfo.h>, use syscall(SYS_sysinfo, ...) directly
instead of the libc wrapper.

Signed-off-by: Chris Webb <chris@arachsys.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-12-09 23:26:29 -05:00
..
sched Update closures from kernel source tree 2021-05-27 21:13:52 -04:00
unaligned Delete more shim layer code 2018-12-19 20:34:24 -05:00
atomic.h Update bcachefs sources to 783085c3cc44 kbuild: Allow gcov to be enabled on the command line 2023-11-22 16:55:06 -05:00
backing-dev-defs.h Update bcachefs sources to 5fd0c70102 bcachefs: Fix __remove_dirent() 2021-11-03 21:28:23 -04:00
backing-dev.h fixes for 32 bit builds/non x86 archs 2018-05-17 02:36:19 -04:00
bio.h Update bcachefs sources to 25de2b00dc bcachefs: Change check for invalid key types 2023-07-07 04:25:07 -04:00
bit_spinlock.h bcachefs-tools: fix endian problems between bit spinlocks and futexes 2023-09-19 17:26:45 -04:00
bitmap.h Update bcachefs sources to ed6b7f81a7 six locks: Disable percpu read lock mode in userspace 2023-06-10 22:15:00 -04:00
bitops.h hweight32() 2022-06-27 15:58:39 -04:00
blk_types.h cmd_dump: Use buffered IO for reading device metadata 2022-06-18 18:33:25 -04:00
blkdev.h Update bcachefs sources to f9c612bbf82d bcachefs: Fixes for building in userspace 2023-09-23 20:03:23 -04:00
bsearch.h Update bcachefs sources to 8d3093bd9b bcachefs: Evict btree nodes we're deleting 2021-04-26 20:18:47 -04:00
bug.h Update bcachefs sources to cd779e0cc5 bcachefs: Skip inode unpack/pack in bch2_extent_update() 2022-10-22 14:41:54 -04:00
bvec.h Update bcachefs sources to 84f132d569 bcachefs: fsck: Break walk_inode() up into multiple functions 2023-06-27 19:38:18 -04:00
byteorder.h Patches to support musl libc 2018-02-09 22:20:56 +01:00
cache.h fixes for 32 bit builds/non x86 archs 2018-05-17 02:36:19 -04:00
closure.h Update bcachefs sources to 783085c3cc44 kbuild: Allow gcov to be enabled on the command line 2023-11-22 16:55:06 -05:00
compiler.h Update bcachefs sources to 24bdb6fed91c bcachefs: bch2_btree_id_str() 2023-10-19 22:56:59 -04:00
completion.h Update bcachefs sources to d5e561b3cc bcachefs: BCH_DATA ioctl 2018-02-08 15:33:42 -05:00
console.h bcache in userspace; userspace fsck 2017-01-20 09:07:08 -09:00
cpumask.h Update bcachefs sources to 1d669389f7 bcachefs: use a radix tree for inum bitmap in fsck 2020-11-07 13:09:23 -05:00
crc32c.h Faster crc32c 2017-10-08 10:20:36 -08:00
crc64.h Update bcachefs sources to ef60854e99 bcachefs: More allocator startup improvements 2019-01-13 20:53:25 -05:00
crypto.h drop dead code 2018-05-17 07:24:39 -04:00
ctype.h bcache in userspace; userspace fsck 2017-01-20 09:07:08 -09:00
dcache.h Update bcachefs sources to 940d6ca657 bcachefs: acl code improvements 2018-07-13 00:45:28 -04:00
debugfs.h Delete more shim layer code 2018-12-19 20:34:24 -05:00
device.h bcache in userspace; userspace fsck 2017-01-20 09:07:08 -09:00
dynamic_fault.h bcache in userspace; userspace fsck 2017-01-20 09:07:08 -09:00
err.h bcache in userspace; userspace fsck 2017-01-20 09:07:08 -09:00
errname.h Update bcachefs sources to 90a9c61e2b bcachefs: Switch bch2_btree_delete_range() to bch2_trans_run() 2022-08-11 17:34:34 -04:00
export.h bcache in userspace; userspace fsck 2017-01-20 09:07:08 -09:00
freezer.h Update bcachefs sources to 171da96d76 bcachefs: Drop some anonymous structs, unions 2023-03-04 23:33:25 -05:00
generic-radix-tree.h Update bcachefs sources to b9bd69421f73 bcachefs: x-macro-ify inode flags enum 2023-11-02 14:39:01 -04:00
genhd.h bcache in userspace; userspace fsck 2017-01-20 09:07:08 -09:00
gfp.h bcache in userspace; userspace fsck 2017-01-20 09:07:08 -09:00
hash.h bcache in userspace; userspace fsck 2017-01-20 09:07:08 -09:00
idr.h bcache in userspace; userspace fsck 2017-01-20 09:07:08 -09:00
ioprio.h bcache in userspace; userspace fsck 2017-01-20 09:07:08 -09:00
jhash.h bcache in userspace; userspace fsck 2017-01-20 09:07:08 -09:00
jiffies.h Switch to CLOCK_MONOTONIC_COARSE 2023-06-18 14:32:28 -04:00
kernel.h fix fallback flex array 2023-12-07 21:36:45 +01:00
key.h drop dead code 2018-05-17 07:24:39 -04:00
kmemleak.h Update bcachefs sources to cbccc6d869 bcachefs: Ratelimit ec error message 2022-10-09 02:33:05 -04:00
kobject.h Update bcachefs sources to fad6d13aa5 fixup! bcachefs: Add persistent counters 2022-05-30 23:24:10 -04:00
kthread.h bcache in userspace; userspace fsck 2017-01-20 09:07:08 -09:00
list_nulls.h Update bcachefs sources to 18686af684 bcachefs: Inode backpointers 2021-03-29 00:22:38 -04:00
list.h Update bcachefs sources to 3ca08ab51ec9 bcachefs: six locks: Simplify optimistic spinning 2023-11-12 20:57:28 -05:00
llist.h Update llist code 2019-08-28 11:35:00 -04:00
lockdep.h Update bcachefs sources to 400c2f8d96 bcachefs: Mask out unknown compat features when going read-write 2021-07-11 13:57:11 -04:00
log2.h Update log2.h from linux kernel 2020-05-21 17:19:47 -04:00
lz4.h Update bcachefs sources to e14d7c7195 bcachefs: Compression levels 2023-07-15 17:36:15 -04:00
math64.h bcache in userspace; userspace fsck 2017-01-20 09:07:08 -09:00
math.h Update bcachefs sources to 33a60d9b05 bcachefs: Assorted fixes for clang 2023-08-01 22:13:03 -04:00
mempool.h Add a real mempool implementation 2021-04-24 01:36:43 -04:00
mm.h bcachefs-tools: Use sysinfo(2) directly to implement si_meminfo() 2023-12-09 23:26:29 -05:00
module.h Delete more shim layer code 2018-12-19 20:34:24 -05:00
mutex.h update bcache sources 2017-03-10 12:40:01 -09:00
osq_lock.h bcache in userspace; userspace fsck 2017-01-20 09:07:08 -09:00
overflow.h Update bcachefs sources to 18686af684 bcachefs: Inode backpointers 2021-03-29 00:22:38 -04:00
page.h Update bcachefs sources to b0788c47d9 bcachefs: Fix check_version_upgrade() 2023-08-11 22:25:12 -04:00
percpu-refcount.h fix percpu_ref_reinit() 2017-03-16 14:23:40 -08:00
percpu-rwsem.h Update bcachefs sources to 14f68409be bcachefs: Optimize fiemap 2019-08-27 17:37:03 -04:00
percpu.h Delete more shim layer code 2018-12-19 20:34:24 -05:00
poison.h Update bcachefs sources to 6a20aede29 bcachefs: Fix quotas + snapshots 2023-05-02 00:41:47 -04:00
posix_acl_xattr.h Update bcachefs sources to 84f132d569 bcachefs: fsck: Break walk_inode() up into multiple functions 2023-06-27 19:38:18 -04:00
posix_acl.h bcache in userspace; userspace fsck 2017-01-20 09:07:08 -09:00
prandom.h Update bcachefs sources to ea93c26e98 fixup! bcachefs: We can handle missing btree roots for all alloc btrees 2023-02-09 18:36:24 -05:00
preempt.h Change preempt_disable() etc. to use a recursive mutex. 2019-11-03 23:17:43 -05:00
prefetch.h Update bcachefs sources to cd779e0cc5 bcachefs: Skip inode unpack/pack in bch2_extent_update() 2022-10-22 14:41:54 -04:00
pretty-printers.h Update bcachefs sources to 24f7e08cd8 bcachefs: shrinker.to_text() methods 2022-06-09 15:07:25 -04:00
printk.h Fix printk_ratelimited() 2022-06-22 22:05:39 -04:00
random.h get_random_u32_below() 2023-06-27 19:45:40 -04:00
ratelimit.h bcache in userspace; userspace fsck 2017-01-20 09:07:08 -09:00
rculist.h drop dead code 2018-05-17 07:24:39 -04:00
rcupdate.h Update bcachefs sources to f9c612bbf82d bcachefs: Fixes for building in userspace 2023-09-23 20:03:23 -04:00
rhashtable-types.h Update bcachefs sources to 18686af684 bcachefs: Inode backpointers 2021-03-29 00:22:38 -04:00
rhashtable.h Update bcachefs sources to 33a60d9b05 bcachefs: Assorted fixes for clang 2023-08-01 22:13:03 -04:00
rwsem.h Update bcachefs sources to 47ffed9fad bcachefs: bch2_btree_delete_range_trans() now uses peek_upto() 2022-10-10 00:10:45 -04:00
scatterlist.h Delete more shim layer code 2018-12-19 20:34:24 -05:00
sched.h Update bcachefs sources to 0d63ed13ea3d closures: Fix race in closure_sync() 2023-10-25 13:59:16 -04:00
semaphore.h Update bcachefs sources to 4837f82ee1 bcachefs: Use cached iterators for alloc btree 2020-06-15 16:27:19 -04:00
seq_buf.h Update bcachefs sources to ea93c26e98 fixup! bcachefs: We can handle missing btree roots for all alloc btrees 2023-02-09 18:36:24 -05:00
seq_file.h Delete more shim layer code 2018-12-19 20:34:24 -05:00
seqlock.h Delete more shim layer code 2018-12-19 20:34:24 -05:00
shrinker.h Update bcachefs sources to 783085c3cc44 kbuild: Allow gcov to be enabled on the command line 2023-11-22 16:55:06 -05:00
siphash.h Update bcachefs sources to ba398d2906 bcachefs: Fix reflink repair code 2022-02-13 04:08:33 -05:00
slab.h Fix build on 32 bit 2023-11-07 21:17:06 -05:00
sort.h Delete more shim layer code 2018-12-19 20:34:24 -05:00
spinlock.h Fix printk_ratelimited() 2022-06-22 22:05:39 -04:00
srcu.h Update bcachefs sources to d1fd471830 bcachefs: Add more debug checks 2020-11-16 18:23:54 -05:00
stat.h Patches to support musl libc 2018-02-09 22:20:56 +01:00
string_helpers.h Update bcachefs sources to dfaf9a6ee2 lib/printbuf: Clean up headers 2022-08-18 12:49:48 -04:00
string.h Update bcachefs sources to cd779e0cc5 bcachefs: Skip inode unpack/pack in bch2_extent_update() 2022-10-22 14:41:54 -04:00
sysfs.h Update bcachefs sources to fad6d13aa5 fixup! bcachefs: Add persistent counters 2022-05-30 23:24:10 -04:00
time64.h Update bcachefs sources to 15f6e66e86 bcachefs: pass around bset_tree less 2018-08-15 20:00:21 -04:00
timer.h Update bcachefs sources to 0906b1fb49 bcachefs: fixes for 32 bit/big endian machines 2018-05-17 02:36:19 -04:00
tracepoint.h bcache in userspace; userspace fsck 2017-01-20 09:07:08 -09:00
typecheck.h bcache in userspace; userspace fsck 2017-01-20 09:07:08 -09:00
types.h Update bcachefs sources to 6a20aede29 bcachefs: Fix quotas + snapshots 2023-05-02 00:41:47 -04:00
uuid.h Update bcachefs sources to 84f132d569 bcachefs: fsck: Break walk_inode() up into multiple functions 2023-06-27 19:38:18 -04:00
vmalloc.h Update bcachefs sources to f638850417 bcachefs: bch2_trans_log_msg() 2022-03-30 17:40:37 -04:00
wait.h Update bcachefs sources to ea93c26e98 fixup! bcachefs: We can handle missing btree roots for all alloc btrees 2023-02-09 18:36:24 -05:00
workqueue.h Update bcachefs sources to 0906b1fb49 bcachefs: fixes for 32 bit/big endian machines 2018-05-17 02:36:19 -04:00
xattr.h Update bcachefs sources to 6a20aede29 bcachefs: Fix quotas + snapshots 2023-05-02 00:41:47 -04:00
xxhash.h Update bcachefs sources to dbee44d5ab bcachefs: add bcachefs xxhash support 2021-07-07 20:30:53 -04:00
zlib.h Delete more unused shim code, update bcache code 2017-03-03 23:17:31 -09:00
zstd_errors.h Update bcachefs sources to e48731a188 bcachefs: Fix BTREE_TRIGGER_WANTS_OLD_AND_NEW 2022-03-13 19:20:59 -04:00
zstd.h Update bcachefs sources to e48731a188 bcachefs: Fix BTREE_TRIGGER_WANTS_OLD_AND_NEW 2022-03-13 19:20:59 -04:00