Conversation
tmpfs was implementing ->writepage() as a "everything went well" so filemap_writepages works correctly. However, it's not correct on reclaim - reclaim thinks it can write it back, it "does" but data is not preserved, thus on the next refault it will read all-zeros back, instead of whatever was there before. Instead of that, add a noop_fsyncdata(). Now tmpfs never uses filemap_writepages(), and thus ->writepage() doesn't need to be implemented. Reclaim takes it as a sign the filesystem can't write anything back, and all is well. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
If the mount fails, it is imperative to unregister the shrinker. Otherwise it will remain registered and cause UAFs later on. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Instead of allocating everything in one go (uses a lot of memory, more likely to fail), chunk the writes by PAGE_SIZE at a time. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Confusing and annoying to the user. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Add fadvise64(), backend to fadvise() in userspace and posix_fadvise() as well. With it, implement POSIX_FADV_WILLNEED. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Add support for invoking fsck for the root filesystem, if present in the initrd. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Implement nosuid (which stops setuid/setgid executables from doing the actual setuid bit) and nodev (which stops device files from working on a given mount). Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
It seems that Linux mount(2) can tolerate some parameters as NULL. A good example is the filesystem type, which is ignored if not used. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Ever since the blamed commit, RCU will not trigger easily as staying on a given thread (e.g idle thread) does not call rcu_do_quiesc(). This happens because rcu_do_quiesc() was being done in sched_load_finis(). This makes RCU practically useless. Instead of that, move the call earlier in the sched switching. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
The proper behavior for a poll() is to signal a pipe has been broken. This is not true if it never actually got connected in the first place. As such, keep a writer sequence count in file->private_data. This makes it so poll() only returns POLLHUP if the current pipe has seen a writer that is no longer there. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
This is useful and helps diagnose unimplemented mount flags. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Properly collect sigign and sigcatch masks for /proc/pid/stat. Signed-off-by: Pedro Falcato <pedro.falcato@gmail.com>
Add a version file that says "onyx-rolling". Required by some /proc parsing programs. 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.