Comments (11)
This is around here, it's always the crawler thread that exposes this kernel backtrace:
1244 /*
1245 * This walks the tree of merged and resolved refs. Tree blocks are
1246 * read in as needed. Unique entries are added to the ulist, and
1247 * the list of found roots is updated.
1248 *
1249 * We release the entire tree in one go before returning.
1250 */
1251 node = rb_first(&preftrees.direct.root);
1252 while (node) {
1253 ref = rb_entry(node, struct prelim_ref, rbnode);
1254 node = rb_next(&ref->rbnode);
1255 WARN_ON(ref->count < 0);
1256 if (roots && ref->count && ref->root_id && ref->parent == 0) {
1257 if (sc && sc->root_objectid &&
1258 ref->root_id != sc->root_objectid) {
1259 ret = BACKREF_FOUND_SHARED;
1260 goto out;
1261 }
from bees.
I've been seeing that warning for years. It's a lot more common post-v4.14 (it occurs about once an hour on v4.12, once a minute on v4.14).
I'm not sure whether the various if (...ref->count...)
statements do useful things when ref->count is negative. Whatever they do seems to be mostly harmless, given the thousands of times it has occurred for me over the past few years. I wonder if this could lead to things like FIEMAP falsely reporting extents as shared (possibly causing nodatacow to fail unnecessarily)?
from bees.
I think I saw something about ref->count
in 4.14.13, I'll look if I can identify the patch again... Hang on...
from bees.
Can't find it... No idea where I found it. I'll try to ignore it keeping in mind that you're seeing it much more often without any visible effects.
from bees.
Maybe torvalds/linux@ec35e48 which was also cherry-picked for v4.14.13.
I haven't tested that yet, but I don't think it affects this WARN_ON. A comment elsewhere states that ref->count may be negative for delayed refs, and bees probably ends up calling LOGICAL_INO on a lot of those.
from bees.
Yes, I found this, too. Maybe I'm confusing with an older commit that actually replaced an WARN_ON(...)
from bees.
This happens on v4.14.14 too.
There was an earlier commit that touched this WARN_ON, but it didn't make a semantic change, it was just a code cleanup.
from bees.
https://www.spinics.net/lists/linux-btrfs/msg74077.html
Assuming that the above patch is accepted, the offending kernel warning will be killed.
from bees.
Nice work...
Would it make sense to guard the WARN_ON with if (node->action != BTRFS_DROP_DELAYED_REF)
then, so it is still caught in other cases, instead of removing it completely?
from bees.
That would be a good question for the list. Sprinkling the code with random WARN_ONs is generally frowned upon without a compelling reason--probably to avoid having issues like this pop up 7 years later.
from bees.
This has been merged into upstream kernels 4.14.29 and 4.16-rc2. 4.9.x, 4.4x, and other LTS kernels don't need it because it doesn't affect them.
from bees.
Related Issues (20)
- Build error: flexible array member 'btrfs_data_container::val' not at end of 'struct crucible::BtrfsDataContainer'
- Failed to locate executable /usr/sbin/beesd: Permission denied HOT 2
- Build error: flexible array member 'fiemap::fm_extents' not at end of 'struct crucible::Fiemap' HOT 2
- Build fails on linux-6 headers: error: flexible array member 'btrfs_ioctl_same_args::info' not at end of 'struct crucible::BtrfsExtentSame' HOT 2
- Request for version bump HOT 1
- Missing commit from 2 years ago in v0.8 but in master??? HOT 3
- What actually is a "toxic match"? HOT 2
- RFC: bees startup and distro integration HOT 19
- Toxic hashes matches, bees DB size HOT 1
- Bees hangs up 6.1.7-1-MANJARO kernel HOT 5
- Test error on i686 and armhf (easy fix)
- GRUB: Extent not found after running bees HOT 4
- a segfault of bees HOT 2
- limit the dedup min size 64K for less fragment? HOT 2
- Bees crashes after 10 minutes of running HOT 1
- munmap when not actively scanning HOT 2
- Help with using Bees.in setup script HOT 8
- build failure with GCC 13 HOT 2
- How exactly is the compression method set and how might one go about changing it? HOT 1
- regression on linux 6.3.1: 'vmalloc error' during crawl HOT 16
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bees.