Conversation
Add a single FLUSH command and a helper for users to call it. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Add FLUSH support through the FLUSH NVM command. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Add ATA FLUSH command support. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Add FLUSH command support using the ATA cache flushing command. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
It turns out reclaim is not super reliable if there are too many dirty pages in memory - it becomes much harder to allocate memory for doing the cleaning itself. As such, add a mechanism for writeback once there are too many dirty pages in memory (with some primitive write throttling). As part of this change, rework writeback internals a little bit. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
The offset passed to ext2_revalidate_dir needs to be relative to the folio, not to the file. Fixes: 9f1ffc5 ("fs/ext2: Use i_version to guard against bad directory walks") Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
346ee54 to
52af614
Compare
Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Namely, don't include static in __always_inline. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Builds with LOCKDEP are already out of the old mapped zone. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Most of them not fully implemented. Some empty. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Allow static keys to be used in C code by removing template usage. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Add kmemdup, which is memdup with an explicit GFP argument. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Require the name and add the lockdep class init as well. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Add __GFP_ZERO, which enforces zeroing of memory. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
This is required by DRM. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
The change of the mode from 0777 to 1777 makes the number stop being octal. Make it 01777 instead. Fixes: 611b3a2 ("tmpfs: Default the root directory to 1777") Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
This is a good idea and avoids resource exhaustion. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Following the mount up was just grabbing the mountpoint, and leaving us in the same place after the mountpoint was resolved. Fix it by grabbing the mountpoint's parent. Fixes: d3897d2 ("namei: Rework dot-dot following on mounts") Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
If namei_walk_component returned an error for some reason, we should properly return an error code instead of issuing do_creat() on the same place where we were before. This resolves problems when e.g a permission check fails in namei_walk_component(), where we had a !negative data.cur.dentry and thus asserted in do_creat(). Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
unlink() needs a proper lock before doing the dentry lookup that spans until the name is properly unlinked by the filesystem. If not, it's trivial to find filesystem corruption and internal dcache corruption. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
It's strictly required to hold the parent dentry's d_lock when appending a new dentry to it. It turns out it was not being held in dentry_create_pending_lookup(), which corrupted the dcache. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Fix race found by KCSAN by using READ/WRITE_ONCE. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Fix various races found by KCSAN. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Most of them harmless. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Add get_kernel64(), which lets us safely probe the stack without being afraid of page faults. And with it, nuke the "try not to go over the thread's stack" logic. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
And rewrite the old logic into a nicer loop that can easily be changed in the future. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
While we save a tiny bit of stack, KCSAN codegen eats a fault because it tries to grab the return address from the stack. Which isn't there, so it also faults. Instead of fancy solutions, just call. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
These functions are supposed to transparently deal with bits > BITS_PER_LONG by Doing The Right Thing. Do so. Fixes a problem with lockdep where it would corrupt its internal data structures. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
For some reason, this causes us to get all sorts of problems that end up in some sort of stack overflow + corruption. Disable it, for now. Some KCSAN is better than no KCSAN. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
KCSAN calling out to external code (like udelay(), for instance) itself also invoked KCSAN, which led to some awkward deep nesting. I don't know why this is not a problem for Linux, but it's a problem for us. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
And while we're here, do proper checks for negative seeks, etc in proper places. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Add a proper implementation of sigtimedwait(), as specified by POSIX. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
We _have_ to retarget signals if we're switching masks for a considerable amount of time, such that signal delivery gets hampered. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Separate it out to another header, and add lockdep tracing. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
This will NOT bisect cleanly :/ Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.