Update bcachefs sources to 93477de251da bcachefs: Compatibility with v6.18

This commit is contained in:
Kent Overstreet 2025-10-15 17:58:40 -04:00
parent bf92c5f6df
commit 456f73c36e
5 changed files with 7 additions and 7 deletions

View File

@ -1 +1 @@
bb35ade3e8bb7af67734b746f416598002822df8
93477de251da483c3fd9b16dca27363c1b44e73f

View File

@ -24,7 +24,7 @@ int __bch2_darray_resize_noprof(darray_char *d, size_t element_size, size_t new_
return -ENOMEM;
void *old = d->data;
#if LINUX_VERSION_CODE <= KERNEL_VERSION(6,17,0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,18,0)
void *new = likely(bytes < INT_MAX)
? kvmalloc_noprof(bytes, gfp)
: vmalloc_noprof(bytes);

View File

@ -49,7 +49,7 @@ struct closure;
(__builtin_types_compatible_p(typeof(_val), _type) || \
__builtin_types_compatible_p(typeof(_val), const _type))
#if defined(__KERNEL__) && LINUX_VERSION_CODE <= KERNEL_VERSION(6,17,0)
#if defined(__KERNEL__) && LINUX_VERSION_CODE < KERNEL_VERSION(6,18,0)
static inline struct bio_vec *bio_inline_vecs(struct bio *bio)
{
return (struct bio_vec *)(bio + 1);
@ -66,7 +66,7 @@ static inline size_t buf_pages(void *p, size_t len)
static inline void *bch2_kvmalloc_noprof(size_t n, gfp_t flags)
{
#if LINUX_VERSION_CODE <= KERNEL_VERSION(6,17,0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,18,0)
void *p = unlikely(n >= INT_MAX)
? vmalloc_noprof(n)
: kvmalloc_noprof(n, flags & ~__GFP_ZERO);

View File

@ -148,7 +148,7 @@ start:
bio->bi_iter.bi_sector = offset >> 9;
bio->bi_private = dio;
#if LINUX_VERSION_CODE <= KERNEL_VERSION(6,17,0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,18,0)
ret = bio_iov_iter_get_pages(bio, iter);
#else
ret = bio_iov_iter_get_pages(bio, iter, 0);
@ -465,7 +465,7 @@ static __always_inline long bch2_dio_write_loop(struct dio_write *dio)
EBUG_ON(current->faults_disabled_mapping);
current->faults_disabled_mapping = mapping;
#if LINUX_VERSION_CODE <= KERNEL_VERSION(6,17,0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,18,0)
ret = bio_iov_iter_get_pages(bio, &dio->iter);
#else
ret = bio_iov_iter_get_pages(bio, &dio->iter, 0);

View File

@ -26,7 +26,7 @@
#define FSOP_GOING_FLAGS_LOGFLUSH 0x1 /* flush log but not data */
#define FSOP_GOING_FLAGS_NOLOGFLUSH 0x2 /* don't flush log nor data */
#if LINUX_VERSION_CODE <= KERNEL_VERSION(6,17,0)
#if LINUX_VERSION_CODE < KERNEL_VERSION(6,18,0)
#define start_creating_user_path user_path_create
#define end_creating_path done_path_create
#define start_removing_user_path_at user_path_locked_at