|
Bugzilla – Full Text Bug Listing |
| Summary: | zram_submit_bio WARNING due to bcachefs REQ_OP_FLUSH | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE Tumbleweed | Reporter: | David Disseldorp <ddiss> |
| Component: | Kernel:Filesystems | Assignee: | Kernel Filesystems <kernel-fs> |
| Status: | RESOLVED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Normal | ||
| Priority: | P5 - None | ||
| Version: | Current | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
|
Description
David Disseldorp
2024-01-30 12:22:58 UTC
From a quick glance it looks as though bcachefs is submitting one or more REQ_OP_FLUSH bios:
55) void bch2_inode_flush_nocow_writes_async(struct bch_fs *c,
56) struct bch_inode_info *inode,
57) struct closure *cl)
58) {
59) struct nocow_flush *bio;
60) struct bch_dev *ca;
61) struct bch_devs_mask devs;
62) unsigned dev;
63)
64) dev = find_first_bit(inode->ei_devs_need_flush.d, BCH_SB_MEMBERS_MAX);
65) if (dev == BCH_SB_MEMBERS_MAX)
66) return;
67)
68) devs = inode->ei_devs_need_flush;
69) memset(&inode->ei_devs_need_flush, 0, sizeof(inode->ei_devs_need_flush));
70)
71) for_each_set_bit(dev, devs.d, BCH_SB_MEMBERS_MAX) {
72) rcu_read_lock();
73) ca = rcu_dereference(c->devs[dev]);
74) if (ca && !percpu_ref_tryget(&ca->io_ref))
75) ca = NULL;
76) rcu_read_unlock();
77)
78) if (!ca)
79) continue;
80)
81) bio = container_of(bio_alloc_bioset(ca->disk_sb.bdev, 0,
82) REQ_OP_FLUSH,
83) GFP_KERNEL,
84) &c->nocow_flush_bioset),
85) struct nocow_flush, bio);
86) bio->cl = cl;
87) bio->ca = ca;
88) bio->bio.bi_end_io = nocow_flush_endio;
89) closure_bio_submit(&bio->bio, cl);
90) }
91) }
which makes it through to zram and is unhandled by zram_submit_bio():
1932) static void zram_submit_bio(struct bio *bio)
1933) {
1934) struct zram *zram = bio->bi_bdev->bd_disk->private_data;
1935)
1936) switch (bio_op(bio)) {
1937) case REQ_OP_READ:
1938) zram_bio_read(zram, bio);
1939) break;
1940) case REQ_OP_WRITE:
1941) zram_bio_write(zram, bio);
1942) break;
1943) case REQ_OP_DISCARD:
1944) case REQ_OP_WRITE_ZEROES:
1945) zram_bio_discard(zram, bio);
1946) break;
1947) default:
1948) WARN_ON_ONCE(1);
1949) bio_endio(bio);
1950) }
1951) }
(In reply to David Disseldorp from comment #1) > From a quick glance it looks as though bcachefs is submitting one or more > REQ_OP_FLUSH bios: This is a bcachefs bug: it should be using the REQ_PREFLUSH flag instead of REQ_OP_FLUSH. It's fixed in mainline v6.8-rc2 via 3e44f325f6f75 ("bcachefs: fix incorrect usage of REQ_OP_FLUSH"). I've submitted the fix for Tumbleweed inclusion via https://kerncvs.suse.de/gitweb/?p=kernel-source.git;a=shortlog;h=refs/heads/users/ddiss/stable/for-next Closing... |