aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
authorBart Van Assche <bvanassche@acm.org>2026-06-10 12:34:17 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2026-06-22 19:52:37 +0000
commit41b7928813b5db9f61bf55e0ce395f69eb0473eb (patch)
tree78cb6bea0decc83cd23b332f5c6e08216429301d /fs
parent242d30bfc0a84b8b5de0a88821b53c9ad7fd31c4 (diff)
downloadath-41b7928813b5db9f61bf55e0ce395f69eb0473eb.tar.gz
f2fs: Prepare for supporting delayed bio completion
Use bio frontpadding to allocate memory for a work_struct when allocating a bio. Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/f2fs/data.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 60dea95b0295e..9bddc8bf0af6e 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -41,12 +41,17 @@ struct f2fs_folio_state {
unsigned int read_pages_pending;
};
+struct f2fs_bio {
+ struct work_struct work;
+ struct bio bio;
+};
+
#define F2FS_BIO_POOL_SIZE NR_CURSEG_TYPE
int __init f2fs_init_bioset(void)
{
return bioset_init(&f2fs_bioset, F2FS_BIO_POOL_SIZE,
- 0, BIOSET_NEED_BVECS);
+ offsetof(struct f2fs_bio, bio), BIOSET_NEED_BVECS);
}
void f2fs_destroy_bioset(void)