linux/fs
Kuan-Wei Chiu 1fcce6b8a7 bcachefs: remove heap-related macros and switch to generic min_heap
Drop the heap-related macros from bcachefs and replacing them with the
generic min_heap implementation from include/linux.  By doing so, code
readability is improved by using functions instead of macros.  Moreover,
the min_heap implementation in include/linux adopts a bottom-up variation
compared to the textbook version currently used in bcachefs.  This
bottom-up variation allows for approximately 50% reduction in the number
of comparison operations during heap siftdown, without changing the number
of swaps, thus making it more efficient.

[visitorckw@gmail.com: fix missing assignment of minimum element]
  Link: https://lkml.kernel.org/r/20240602174828.1955320-1-visitorckw@gmail.com
Link: https://lkml.kernel.org/ioyfizrzq7w7mjrqcadtzsfgpuntowtjdw5pgn4qhvsdp4mqqg@nrlek5vmisbu
Link: https://lkml.kernel.org/r/20240524152958.919343-17-visitorckw@gmail.com
Signed-off-by: Kuan-Wei Chiu <visitorckw@gmail.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Acked-by: Kent Overstreet <kent.overstreet@linux.dev>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Bagas Sanjaya <bagasdotme@gmail.com>
Cc: Brian Foster <bfoster@redhat.com>
Cc: Ching-Chun (Jim) Huang <jserv@ccns.ncku.edu.tw>
Cc: Coly Li <colyli@suse.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Matthew Sakai <msakai@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2024-06-24 22:25:00 -07:00
..
9p Two fixes headed to stable trees: 2024-05-29 09:25:15 -07:00
adfs
affs
afs netfs, 9p: Fix race between umount and async request completion 2024-05-27 13:12:13 +02:00
autofs
bcachefs bcachefs: remove heap-related macros and switch to generic min_heap 2024-06-24 22:25:00 -07:00
befs
bfs
btrfs for-6.10-rc4-tag 2024-06-20 11:25:51 -07:00
cachefiles cachefiles: remove unneeded include of <linux/fdtable.h> 2024-06-03 15:39:17 +02:00
ceph We have a series from Xiubo that adds support for additional access 2024-05-25 14:23:58 -07:00
coda
configfs
cramfs
crypto The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
debugfs debugfs: continue to ignore unknown mount options 2024-05-28 14:32:42 +02:00
devpts
dlm
ecryptfs hardening updates for 6.10-rc1 2024-05-13 14:14:05 -07:00
efivarfs
efs
erofs Changes since last update: 2024-05-24 09:31:50 -07:00
exfat
exportfs
ext2
ext4 bd_inode series 2024-05-21 09:51:42 -07:00
f2fs f2fs update for 6.10-rc1 2024-05-20 13:23:43 -07:00
fat
freevxfs
fuse virtio: features, fixes, cleanups 2024-05-23 12:04:36 -07:00
gfs2 bd_inode series 2024-05-21 09:51:42 -07:00
hfs
hfsplus
hostfs
hpfs
hugetlbfs The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
iomap iomap: Fix iomap_adjust_read_range for plen calculation 2024-06-05 17:27:03 +02:00
isofs isofs: Use *-y instead of *-objs in Makefile 2024-05-09 18:09:57 +02:00
jbd2 bd_inode series 2024-05-21 09:51:42 -07:00
jffs2 This pull request contains the following changes for JFFS2: 2024-05-25 13:23:42 -07:00
jfs jfs: xattr: fix buffer overflow for invalid xattr 2024-06-04 18:09:03 +02:00
kernfs
lockd
minix
netfs vfs-6.10-rc2.fixes 2024-05-27 08:09:12 -07:00
nfs NFS client bugfixes for Linux 6.10 2024-06-13 11:07:32 -07:00
nfs_common
nfsd nfsd-6.10 fixes: 2024-06-22 13:55:56 -07:00
nilfs2 nilfs2: fix nilfs_empty_dir() misjudgment and long loop on I/O errors 2024-06-05 19:19:27 -07:00
nls
notify Revert "fanotify: remove unneeded sub-zero check for unsigned value" 2024-05-20 12:43:58 -07:00
ntfs3 driver ntfs3 for linux 6.10 2024-05-25 14:19:01 -07:00
ocfs2 ocfs2: strict bound check before memcmp in ocfs2_xattr_find_entry() 2024-06-24 22:24:55 -07:00
omfs
openpromfs
orangefs orangefs: fix out-of-bounds fsid access 2024-05-14 17:44:14 -07:00
overlayfs ovl: fix encoding fid for lower only root 2024-06-14 10:30:40 +02:00
proc mm/ksm: fix ksm_zero_pages accounting 2024-06-05 19:19:26 -07:00
pstore
qnx4
qnx6
quota
ramfs
reiserfs getting rid of bogus set_blocksize() uses, switching it 2024-05-21 08:34:51 -07:00
romfs
smb cifs: Move the 'pid' from the subreq to the req 2024-06-20 15:25:08 -05:00
squashfs Mainly singleton patches, documented in their respective changelogs. 2024-05-19 14:02:03 -07:00
sysfs
sysv
tracefs eventfs: Do not use attributes for events directory 2024-05-23 09:31:50 -04:00
ubifs
udf
ufs
unicode kbuild: use $(src) instead of $(srctree)/$(src) for source directory 2024-05-10 04:34:52 +09:00
vboxsf
verity
xfs xfs: fix unlink vs cluster buffer instantiation race 2024-06-17 11:17:09 +05:30
zonefs
aio.c Assorted commits that had missed the last merge window... 2024-05-21 13:11:44 -07:00
anon_inodes.c
attr.c
backing-file.c
bad_inode.c
binfmt_elf_fdpic.c
binfmt_elf_test.c
binfmt_elf.c Mainly singleton patches, documented in their respective changelogs. 2024-05-19 14:02:03 -07:00
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
buffer.c bd_inode series 2024-05-21 09:51:42 -07:00
char_dev.c
compat_binfmt_elf.c
coredump.c virtio: features, fixes, cleanups 2024-05-23 12:04:36 -07:00
d_path.c
dax.c
dcache.c Revert "vfs: Delete the associated dentry when deleting a file" 2024-05-29 09:39:34 -07:00
direct-io.c
drop_caches.c
eventfd.c
eventpoll.c
exec.c The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
fcntl.c fcntl: add F_DUPFD_QUERY fcntl() 2024-05-10 08:26:31 +02:00
fhandle.c
file_table.c
file.c fs/file: fix the check in find_next_fd() 2024-05-30 09:11:47 +02:00
filesystems.c
fs_context.c
fs_parser.c
fs_pin.c
fs_struct.c
fs_types.c
fs-writeback.c
fsopen.c
init.c
inode.c
internal.h
ioctl.c fs/ioctl: Add a comment to keep the logic in sync with LSM policies 2024-05-13 06:58:35 +02:00
Kconfig
Kconfig.binfmt
kernel_read_file.c
libfs.c
locks.c
Makefile
mbcache.c
mnt_idmapping.c
mount.h
mpage.c
namei.c overlayfs update for 6.10 2024-05-22 09:23:18 -07:00
namespace.c
nsfs.c
open.c
pidfs.c fs/pidfs: make 'lsof' happy with our inode changes 2024-05-21 08:08:00 -07:00
pipe.c
pnode.c
pnode.h
posix_acl.c
proc_namespace.c
read_write.c Assorted commits that had missed the last merge window... 2024-05-21 13:11:44 -07:00
readdir.c
remap_range.c
select.c
seq_file.c
signalfd.c signalfd: drop an obsolete comment 2024-05-24 13:34:07 +02:00
splice.c
stack.c
stat.c
statfs.c
super.c \n 2024-05-20 12:31:43 -07:00
sync.c
sysctls.c
timerfd.c
userfaultfd.c The usual shower of singleton fixes and minor series all over MM, 2024-05-19 09:21:03 -07:00
utimes.c
xattr.c