Update bcachefs sources to bb35ade3e8bb bcachefs: Compatibility with v6.18

This commit is contained in:
Kent Overstreet 2025-10-15 16:20:54 -04:00
parent ec08672185
commit 682b57db35
3 changed files with 10 additions and 2 deletions

View File

@ -1 +1 @@
caffe5f36f39ef62d58383b77dfdce931104f8c2
bb35ade3e8bb7af67734b746f416598002822df8

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,17,0)
static inline struct bio_vec *bio_inline_vecs(struct bio *bio)
{
return (struct bio_vec *)(bio + 1);

View File

@ -148,7 +148,11 @@ start:
bio->bi_iter.bi_sector = offset >> 9;
bio->bi_private = dio;
#if LINUX_VERSION_CODE <= KERNEL_VERSION(6,17,0)
ret = bio_iov_iter_get_pages(bio, iter);
#else
ret = bio_iov_iter_get_pages(bio, iter, 0);
#endif
if (ret < 0) {
/* XXX: fault inject this path */
bio->bi_status = BLK_STS_RESOURCE;
@ -461,7 +465,11 @@ 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)
ret = bio_iov_iter_get_pages(bio, &dio->iter);
#else
ret = bio_iov_iter_get_pages(bio, &dio->iter, 0);
#endif
dropped_locks = fdm_dropped_locks();