[PATCH v2 2/2] ext4: Optimize match for casefolded encrypted dirs

2021-03-19 Thread Daniel Rosenberg
Matching names with casefolded encrypting directories requires decrypting entries to confirm case since we are case preserving. We can avoid needing to decrypt if our hash values don't match. Signed-off-by: Daniel Rosenberg --- fs/ext4/ext4.h | 17 --- fs/ext4/namei.c

[PATCH v2 1/2] ext4: Handle casefolding with encryption

2021-03-19 Thread Daniel Rosenberg
. The hash is stored at the end of the directory entry for all entries inside of an encrypted and casefolded directory apart from those that deal with '.' and '..'. This way, the change is backwards compatible with existing ext4 filesystems. Signed-off-by: Daniel Rosenberg

[PATCH v2 0/2] Reconcile Encryption and Casefolding in Ext4

2021-03-19 Thread Daniel Rosenberg
instead of position -Assume last entry in directory will be csum for __ext4_check_entry if csum enabled This means we don't need to pass along lblk all over the place -Don't use siphash value for find_group_orlov, just use regular hash Daniel Rosenberg

Re: [PATCH 1/2] ext4: Handle casefolding with encryption

2021-02-18 Thread Daniel Rosenberg
On Wed, Feb 17, 2021 at 2:48 PM Andreas Dilger wrote: > > On Feb 17, 2021, at 9:08 AM, Theodore Ts'o wrote: > > > > On Tue, Feb 16, 2021 at 08:01:11PM -0800, Daniel Rosenberg wrote: > >> I'm not sure what the conflict is, at least format-wise. Naturally, >

Re: [PATCH 1/2] ext4: Handle casefolding with encryption

2021-02-16 Thread Daniel Rosenberg
I'm not sure what the conflict is, at least format-wise. Naturally, there would need to be some work to reconcile the two patches, but my patch only alters the format for directories which are encrypted and casefolded, which always must have the additional hash field. In the case of dirdata along w

[PATCH 1/2] ext4: Handle casefolding with encryption

2021-02-03 Thread Daniel Rosenberg
. The hash is stored at the end of the directory entry for all entries inside of an encrypted and casefolded directory apart from those that deal with '.' and '..'. This way, the change is backwards compatible with existing ext4 filesystems. Signed-off-by: Daniel Rosenberg

[PATCH 2/2] ext4: Optimize match for casefolded encrypted dirs

2021-02-03 Thread Daniel Rosenberg
Matching names with casefolded encrypting directories requires decrypting entries to confirm case since we are case preserving. We can avoid needing to decrypt if our hash values don't match. Signed-off-by: Daniel Rosenberg Signed-off-by: Paul Lawrence --- fs/ext4/ext4.h

[PATCH 0/2] Reconcile Encryption and Casefolding in Ext4

2021-02-03 Thread Daniel Rosenberg
. e2fsprogs has already been updated with support for casefolding and encryption. Daniel Rosenberg (2): ext4: Handle casefolding with encryption ext4: Optimize match for casefolded encrypted dirs Documentation/filesystems/ext4/directory.rst | 27 ++ fs/ext4/dir.c

Re: [PATCH v4 2/3] fscrypt: Have filesystems handle their d_ops

2020-11-25 Thread Daniel Rosenberg
ound directory right? If you remove it you can still change it, and then add the lost+found directory back. Isn't that how it works currently? I definitely didn't intend to change any behavior around non-encrypted casefolding there. I should look at what fsck does if you do that and have a LoSt+fOuNd folder... -Daniel Rosenberg

[PATCH v4 0/3] Add support for Encryption and Casefolding in F2FS

2020-11-18 Thread Daniel Rosenberg
variable ifdef consistency Daniel Rosenberg (3): libfs: Add generic function for setting dentry_ops fscrypt: Have filesystems handle their d_ops f2fs: Handle casefolding with Encryption fs/crypto/fname.c | 4 -- fs/crypto/fscrypt_private.h | 1 - fs/crypto/hooks.c |

[PATCH v4 2/3] fscrypt: Have filesystems handle their d_ops

2020-11-18 Thread Daniel Rosenberg
r own specific dentry operations as well. That operation will set the minimal d_ops required under the circumstances. Since the fscrypt d_ops are set later on, we must set all d_ops there, since we cannot adjust those later on. This should not result in any change in behavior. Signed-off-by: D

[PATCH v4 3/3] f2fs: Handle casefolding with Encryption

2020-11-18 Thread Daniel Rosenberg
ed to i_name. This patch incorporates work by Eric Biggers and Jaegeuk Kim . Co-developed-by: Eric Biggers Signed-off-by: Eric Biggers Signed-off-by: Daniel Rosenberg Reviewed-by: Eric Biggers --- fs/f2fs/dir.c | 98 +++--- fs/f2fs/f2fs.h

[PATCH v4 1/3] libfs: Add generic function for setting dentry_ops

2020-11-18 Thread Daniel Rosenberg
filesystem supports certain dentry_operations. Signed-off-by: Daniel Rosenberg Reviewed-by: Eric Biggers --- fs/libfs.c | 70 ++ include/linux/fs.h | 1 + 2 files changed, 71 insertions(+) diff --git a/fs/libfs.c b/fs/libfs.c index fc

[PATCH v3 3/3] f2fs: Handle casefolding with Encryption

2020-11-17 Thread Daniel Rosenberg
ed to i_name. This patch incorporates work by Eric Biggers and Jaegeuk Kim . Co-developed-by: Eric Biggers Signed-off-by: Eric Biggers Signed-off-by: Daniel Rosenberg --- fs/f2fs/dir.c | 98 +++--- fs/f2fs/f2fs.h | 8 ++-- fs/f2fs/hash.c | 11

[PATCH v3 2/3] fscrypt: Have filesystems handle their d_ops

2020-11-17 Thread Daniel Rosenberg
r own specific dentry operations as well. That operation will set the minimal d_ops required under the circumstances. Since the fscrypt d_ops are set later on, we must set all d_ops there, since we cannot adjust those later on. This should not result in any change in behavior. Signed-off-by: D

[PATCH v3 1/3] libfs: Add generic function for setting dentry_ops

2020-11-17 Thread Daniel Rosenberg
filesystem supports certain dentry_operations. Signed-off-by: Daniel Rosenberg --- fs/libfs.c | 70 ++ include/linux/fs.h | 1 + 2 files changed, 71 insertions(+) diff --git a/fs/libfs.c b/fs/libfs.c index fc34361c1489..babef1f7b50e 100644 --- a/

[PATCH v3 0/3] Add support for Encryption and Casefolding in F2FS

2020-11-17 Thread Daniel Rosenberg
r upcoming Casefolding/Encryption patches" v2: Simplified generic dentry_op function Passed through errors in f2fs_match_ci_name v3: Split some long lines Cleaned up some code Made some comments clearer Fixed bug in v2 error passing Daniel Rosenberg (3): libfs: Add generic function for set

Re: [PATCH v2 3/3] f2fs: Handle casefolding with Encryption

2020-11-17 Thread Daniel Rosenberg
On Tue, Nov 17, 2020 at 10:50 AM Eric Biggers wrote: > > > What is the assignment to dentry_page supposed to be accomplishing? It looks > like it's meant to pass up errors from f2fs_find_target_dentry(), but it > doesn't > do that. Woops. Fixed that for the next version. > > > @@ -222,14 +250,

[PATCH v2 0/3] Add support for Encryption and Casefolding in F2FS

2020-11-16 Thread Daniel Rosenberg
functions that should work for most cases. These are a follow-up to the previously sent patch set "[PATCH v12 0/4] Prepare for upcoming Casefolding/Encryption patches" v2: Simplified generic dentry_op function Passed through errors in f2fs_match_ci_name Daniel Rosenberg (3): libfs:

[PATCH v2 1/3] libfs: Add generic function for setting dentry_ops

2020-11-16 Thread Daniel Rosenberg
ned-off-by: Daniel Rosenberg --- fs/libfs.c | 60 ++ include/linux/fs.h | 1 + 2 files changed, 61 insertions(+) diff --git a/fs/libfs.c b/fs/libfs.c index fc34361c1489..dd8504f3ff5d 100644 --- a/fs/libfs.c +++ b/fs/libfs.c @@ -1449,4 +1449

[PATCH v2 2/3] fscrypt: Have filesystems handle their d_ops

2020-11-16 Thread Daniel Rosenberg
r own specific dentry operations as well. That operation will set the minimal d_ops required under the circumstances. Since the fscrypt d_ops are set later on, we must set all d_ops there, since we cannot adjust those later on. This should not result in any change in behavior. Signed-off-by: D

[PATCH v2 3/3] f2fs: Handle casefolding with Encryption

2020-11-16 Thread Daniel Rosenberg
ed to i_name. This patch incorporates work by Eric Biggers and Jaegeuk Kim . Co-developed-by: Eric Biggers Signed-off-by: Eric Biggers Signed-off-by: Daniel Rosenberg --- fs/f2fs/dir.c | 89 +- fs/f2fs/f2fs.h | 8 +++-- fs/f2fs/hash.c

[PATCH] ext4: Use generic casefolding support

2020-10-28 Thread Daniel Rosenberg
This switches ext4 over to the generic support provided in libfs. Since casefolded dentries behave the same in ext4 and f2fs, we decrease the maintenance burden by unifying them, and any optimizations will immediately apply to both. Signed-off-by: Daniel Rosenberg Reviewed-by: Eric Biggers

[PATCH 5/5] f2fs: Handle casefolding with Encryption

2020-09-22 Thread Daniel Rosenberg
ed to i_name. This patch incorporates work by Eric Biggers and Jaegeuk Kim . Co-developed-by: Eric Biggers Signed-off-by: Eric Biggers Signed-off-by: Daniel Rosenberg --- fs/f2fs/dir.c | 57 +++--- fs/f2fs/f2fs.h | 8 --- fs/f2fs/hash.c

[PATCH 1/5] ext4: Use generic casefolding support

2020-09-22 Thread Daniel Rosenberg
This switches ext4 over to the generic support provided in the previous patch. Since casefolded dentries behave the same in ext4 and f2fs, we decrease the maintenance burden by unifying them, and any optimizations will immediately apply to both. Signed-off-by: Daniel Rosenberg Reviewed-by: Eric

[PATCH 4/5] fscrypt: Have filesystems handle their d_ops

2020-09-22 Thread Daniel Rosenberg
r own specific dentry operations as well. That operation will set the minimal d_ops required under the circumstances. Since the fscrypt d_ops are set later on, we must set all d_ops there, since we cannot adjust those later on. This should not result in any change in behavior. Signed-off-by: D

[PATCH 2/5] fscrypt: Export fscrypt_d_revalidate

2020-09-22 Thread Daniel Rosenberg
This is in preparation for shifting the responsibility of setting the dentry_operations to the filesystem, allowing it to maintain its own operations. Signed-off-by: Daniel Rosenberg --- fs/crypto/fname.c | 3 ++- include/linux/fscrypt.h | 1 + 2 files changed, 3 insertions(+), 1 deletion

[PATCH 0/5] Add support for Encryption and Casefolding in F2FS

2020-09-22 Thread Daniel Rosenberg
elper functions that should work for most cases. These are a follow-up to the previously sent patch set "[PATCH v12 0/4] Prepare for upcoming Casefolding/Encryption patches" Daniel Rosenberg (5): ext4: Use generic casefolding support fscrypt: Export fscrypt_d_revalidate libfs: Add gen

[PATCH 3/5] libfs: Add generic function for setting dentry_ops

2020-09-22 Thread Daniel Rosenberg
itself. Currently the casefolding dentry operation are always set because the feature is toggleable on empty directories. Since we don't know what set of functions we'll eventually need, and cannot change them later, we add just add them. Signed-off-by: Daniel Rosenberg ---

[PATCH 0/5] Add support for Encryption and Casefolding in F2FS

2020-09-22 Thread Daniel Rosenberg
elper functions that should work for most cases. These are a follow-up to the previously sent patch set "[PATCH v12 0/4] Prepare for upcoming Casefolding/Encryption patches" Daniel Rosenberg (5): ext4: Use generic casefolding support fscrypt: Export fscrypt_d_revalidate libfs: Add gen

Re: [PATCH v12 4/4] ext4: Use generic casefolding support

2020-09-21 Thread Daniel Rosenberg
On Mon, Sep 21, 2020 at 11:29 AM Eric Biggers wrote: > > On Sun, Sep 20, 2020 at 09:10:57PM -0400, Gabriel Krisman Bertazi wrote: > > Daniel Rosenberg writes: > > > > > This switches ext4 over to the generic support provided in > > > the previous patch. &

[PATCH v12 4/4] ext4: Use generic casefolding support

2020-07-08 Thread Daniel Rosenberg
This switches ext4 over to the generic support provided in the previous patch. Since casefolded dentries behave the same in ext4 and f2fs, we decrease the maintenance burden by unifying them, and any optimizations will immediately apply to both. Signed-off-by: Daniel Rosenberg Reviewed-by: Eric

[PATCH v12 2/4] fs: Add standard casefolding support

2020-07-08 Thread Daniel Rosenberg
and f2fs, apart from the use of utf8_casefold_hash to avoid an allocation. By providing a common implementation, all users can benefit from any optimizations without needing to port over improvements. Signed-off-by: Daniel Rosenberg --- fs/libfs.c | 87

[PATCH v12 3/4] f2fs: Use generic casefolding support

2020-07-08 Thread Daniel Rosenberg
This switches f2fs over to the generic support provided in the previous patch. Since casefolded dentries behave the same in ext4 and f2fs, we decrease the maintenance burden by unifying them, and any optimizations will immediately apply to both. Signed-off-by: Daniel Rosenberg Reviewed-by: Eric

[PATCH v12 1/4] unicode: Add utf8_casefold_hash

2020-07-08 Thread Daniel Rosenberg
allocation. Signed-off-by: Daniel Rosenberg Reviewed-by: Gabriel Krisman Bertazi Reviewed-by: Eric Biggers --- fs/unicode/utf8-core.c | 23 ++- include/linux/unicode.h | 3 +++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/fs/unicode/utf8-core.c b/fs/unicode/utf8

[PATCH v12 0/4] Prepare for upcoming Casefolding/Encryption patches

2020-07-08 Thread Daniel Rosenberg
requiring a new string allocation. Daniel Rosenberg (4): unicode: Add utf8_casefold_hash fs: Add standard casefolding support f2fs: Use generic casefolding support ext4: Use generic casefolding support fs/ext4/dir.c | 64 +- fs/ext4/ext4.h | 12

Re: [PATCH v11 2/4] fs: Add standard casefolding support

2020-07-08 Thread Daniel Rosenberg
On Tue, Jul 7, 2020 at 9:12 PM Eric Biggers wrote: > > On Tue, Jul 07, 2020 at 08:05:50PM -0700, Daniel Rosenberg wrote: > > +/** > > + * generic_ci_d_compare - generic d_compare implementation for casefolding > > filesystems > > + * @dentry: dentry whos

[PATCH v11 1/4] unicode: Add utf8_casefold_hash

2020-07-07 Thread Daniel Rosenberg
allocation. Signed-off-by: Daniel Rosenberg Reviewed-by: Gabriel Krisman Bertazi Reviewed-by: Eric Biggers --- fs/unicode/utf8-core.c | 23 ++- include/linux/unicode.h | 3 +++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/fs/unicode/utf8-core.c b/fs/unicode/utf8

[PATCH v11 0/4] Prepare for upcoming Casefolding/Encryption patches

2020-07-07 Thread Daniel Rosenberg
requiring a new string allocation. Daniel Rosenberg (4): unicode: Add utf8_casefold_hash fs: Add standard casefolding support f2fs: Use generic casefolding support ext4: Use generic casefolding support fs/ext4/dir.c | 64 +--- fs/ext4/ext4.h | 12

[PATCH v11 3/4] f2fs: Use generic casefolding support

2020-07-07 Thread Daniel Rosenberg
This switches f2fs over to the generic support provided in the previous patch. Since casefolded dentries behave the same in ext4 and f2fs, we decrease the maintenance burden by unifying them, and any optimizations will immediately apply to both. Signed-off-by: Daniel Rosenberg Reviewed-by: Eric

[PATCH v11 2/4] fs: Add standard casefolding support

2020-07-07 Thread Daniel Rosenberg
and f2fs, apart from the use of utf8_casefold_hash to avoid an allocation. By providing a common implementation, all users can benefit from any optimizations without needing to port over improvements. Signed-off-by: Daniel Rosenberg --- fs/libfs.c | 94

[PATCH v11 4/4] ext4: Use generic casefolding support

2020-07-07 Thread Daniel Rosenberg
This switches ext4 over to the generic support provided in the previous patch. Since casefolded dentries behave the same in ext4 and f2fs, we decrease the maintenance burden by unifying them, and any optimizations will immediately apply to both. Signed-off-by: Daniel Rosenberg Reviewed-by: Eric

[PATCH v10 0/4] Prepare for upcoming Casefolding/Encryption patches

2020-07-07 Thread Daniel Rosenberg
requiring a new string allocation, and ensure we don't attempt to casefold the no-key token of an encrypted filename. Daniel Rosenberg (4): unicode: Add utf8_casefold_hash fs: Add standard casefolding support f2fs: Use generic casefolding support ext4: Use generic casefolding support fs

[PATCH v10 1/4] unicode: Add utf8_casefold_hash

2020-07-07 Thread Daniel Rosenberg
allocation. Signed-off-by: Daniel Rosenberg --- fs/unicode/utf8-core.c | 23 ++- include/linux/unicode.h | 3 +++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/fs/unicode/utf8-core.c b/fs/unicode/utf8-core.c index 2a878b739115..dc25823bfed9 100644 --- a/fs/unicode

[PATCH v10 2/4] fs: Add standard casefolding support

2020-07-07 Thread Daniel Rosenberg
t from any optimizations without needing to port over improvements. Signed-off-by: Daniel Rosenberg --- fs/libfs.c | 96 ++ include/linux/fs.h | 16 2 files changed, 112 insertions(+) diff --git a/fs/libfs.c b/fs/libfs.c index 4d

[PATCH v10 3/4] f2fs: Use generic casefolding support

2020-07-07 Thread Daniel Rosenberg
This switches f2fs over to the generic support provided in the previous patch. Since casefolded dentries behave the same in ext4 and f2fs, we decrease the maintenance burden by unifying them, and any optimizations will immediately apply to both. Signed-off-by: Daniel Rosenberg --- fs/f2fs

[PATCH v10 4/4] ext4: Use generic casefolding support

2020-07-07 Thread Daniel Rosenberg
This switches ext4 over to the generic support provided in the previous patch. Since casefolded dentries behave the same in ext4 and f2fs, we decrease the maintenance burden by unifying them, and any optimizations will immediately apply to both. Signed-off-by: Daniel Rosenberg --- fs/ext4

Re: [PATCH v9 4/4] ext4: Use generic casefolding support

2020-07-07 Thread Daniel Rosenberg
On Tue, Jun 23, 2020 at 10:43 PM Gabriel Krisman Bertazi wrote: > > Daniel Rosenberg writes: > > > - > > const struct dentry_operations ext4_dentry_ops = { > > - .d_hash = ext4_d_hash, > > - .d_compare = ext4_d_compare, > > + .d_hash =

Re: [PATCH v9 2/4] fs: Add standard casefolding support

2020-07-02 Thread Daniel Rosenberg
On Tue, Jun 23, 2020 at 10:57 PM Eric Biggers wrote: > > Note that the '!IS_ENCRYPTED(dir) || fscrypt_has_encryption_key(dir)' check > can > be racy, because a process can be looking up a no-key token in a directory > while > concurrently another process initializes the directory's ->i_crypt_inf

[PATCH v9 1/4] unicode: Add utf8_casefold_hash

2020-06-23 Thread Daniel Rosenberg
This adds a case insensitive hash function to allow taking the hash without needing to allocate a casefolded copy of the string. Signed-off-by: Daniel Rosenberg --- fs/unicode/utf8-core.c | 23 ++- include/linux/unicode.h | 3 +++ 2 files changed, 25 insertions(+), 1

[PATCH v9 3/4] f2fs: Use generic casefolding support

2020-06-23 Thread Daniel Rosenberg
This switches f2fs over to the generic support provided in commit 5f829feca774 ("fs: Add standard casefolding support") Signed-off-by: Daniel Rosenberg --- fs/f2fs/dir.c | 84 + fs/f2fs/f2fs.h | 4 -- fs/f2fs/super.c

[PATCH v9 4/4] ext4: Use generic casefolding support

2020-06-23 Thread Daniel Rosenberg
This switches ext4 over to the generic support provided in commit 5f829feca774 ("fs: Add standard casefolding support") Signed-off-by: Daniel Rosenberg --- fs/ext4/dir.c | 64 ++--- fs/ext4/ext4.h | 12 -- fs/ext4/hash.c | 2 +

[PATCH v9 0/4] Prepare for upcoming Casefolding/Encryption patches

2020-06-23 Thread Daniel Rosenberg
This lays the ground work for enabling casefolding and encryption at the same time for ext4 and f2fs. A future set of patches will enable that functionality. These unify the highly similar dentry_operations that ext4 and f2fs both use for casefolding. Daniel Rosenberg (4): unicode: Add

[PATCH v9 2/4] fs: Add standard casefolding support

2020-06-23 Thread Daniel Rosenberg
This adds general supporting functions for filesystems that use utf8 casefolding. It provides standard dentry_operations and adds the necessary structures in struct super_block to allow this standardization. Ext4 and F2fs will switch to these common implementations. Signed-off-by: Daniel

Re: [PATCH] staging: android: ion: check for kref overflow

2018-08-31 Thread Daniel Rosenberg
On 08/31/2018 08:56 AM, Greg Kroah-Hartman wrote: On Thu, Aug 30, 2018 at 06:36:18PM -0700, Daniel Rosenberg wrote: The sign off was on the 4.4.y version that I cherry-picked this from. Ah that wasn't obvious at all. What is that git commit id? You need to give us a hint as to wh

Re: [PATCH] staging: android: ion: check for kref overflow

2018-08-30 Thread Daniel Rosenberg
On 08/30/2018 05:41 PM, Greg Kroah-Hartman wrote: On Thu, Aug 30, 2018 at 04:09:46PM -0700, Daniel Rosenberg wrote: This patch is against 4.9. It does not apply to master due to a large rework of ion in 4.12 which removed the affected functions altogther. 4c23cbff073f3b9b ("staging: an

[PATCH] staging: android: ion: check for kref overflow

2018-08-30 Thread Daniel Rosenberg
t does not overflow. Signed-off-by: Daniel Rosenberg Signed-off-by: Greg Kroah-Hartman --- drivers/staging/android/ion/ion.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index 6f9

[PATCH v2] staging: android: ion: check for kref overflow

2018-08-21 Thread Daniel Rosenberg
Userspace can cause the kref to handles to increment arbitrarily high. Ensure it does not overflow. Signed-off-by: Daniel Rosenberg --- v2: Fixed patch corruption :( This patch is against 4.4. It does not apply to master due to a large rework of ion in 4.12 which removed the affected functions

[PATCH] staging: android: ion: check for kref overflow

2018-08-20 Thread Daniel Rosenberg
Userspace can cause the kref to handles to increment arbitrarily high. Ensure it does not overflow. Signed-off-by: Daniel Rosenberg --- This patch is against 4.4. It does not apply to master due to a large rework of ion in 4.12 which removed the affected functions altogther. It applies from

[PATCH] HID: debug: check length before copy_to_user()

2018-07-02 Thread Daniel Rosenberg
If our length is greater than the size of the buffer, we overflow the buffer Signed-off-by: Daniel Rosenberg Cc: sta...@vger.kernel.org --- drivers/hid/hid-debug.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c index

[PATCH] drivers: dma-buf: Change %p to %pK in debug messages

2018-05-02 Thread Daniel Rosenberg
The format specifier %p can leak kernel addresses while not valuing the kptr_restrict system settings. Use %pK instead of %p, which also evaluates whether kptr_restrict is set. Signed-off-by: Divya Ponnusamy Signed-off-by: Daniel Rosenberg Cc: stable --- drivers/dma-buf/sync_debug.c | 2 +- 1

[PATCH 4/5] Squashfs: implement .readpages()

2017-09-22 Thread Daniel Rosenberg
kernel can truly prefetch pages using its readahead algorithm. Signed-off-by: Adrien Schildknecht Signed-off-by: Daniel Rosenberg --- fs/squashfs/file.c| 137 ++ fs/squashfs/file_direct.c | 62 ++--- fs/squashfs/squashfs.h

[PATCH 3/5] Squashfs: replace buffer_head with BIO

2017-09-22 Thread Daniel Rosenberg
be merged. Moreover, merging the reads at the FS level means that we rely less on the IO scheduler. Signed-off-by: Adrien Schildknecht Signed-off-by: Daniel Rosenberg --- fs/squashfs/block.c | 522 +- fs/squashfs/file_direct.c | 195 ++-

[PATCH 5/5] Squashfs: optimize reading uncompressed data

2017-09-22 Thread Daniel Rosenberg
. It also reduces the number of unnecessary reads. Signed-off-by: Adrien Schildknecht Signed-off-by: Daniel Rosenberg --- fs/squashfs/block.c | 25 + fs/squashfs/file_direct.c | 37 ++--- 2 files changed, 55 insertions(+), 7 deletions

[PATCH 0/5] Squashfs Whitelist and Compression Threshold

2017-09-22 Thread Daniel Rosenberg
These patches contain several optimizations to Squashfs. ll_rw_block is replaced with submit_bio. readpages is implemented to support asynchronous readahead. Uncompressed file reads are optimized, no longer requiring the entire block to be read if the block doesn't need to be decompressed, which gr

[PATCH 2/5] Squashfs: refactor page_actor

2017-09-22 Thread Daniel Rosenberg
uffer. 3/ Refactor the wrappers to share code that deals with page actors. Signed-off-by: Adrien Schildknecht Signed-off-by: Daniel Rosenberg --- fs/squashfs/cache.c | 73 +++--- fs/squashfs/decompressor.c | 55 +++--- fs/squashfs/file_direct.c| 4 +- f

[PATCH 1/5] Squashfs: remove the FILE_CACHE option

2017-09-22 Thread Daniel Rosenberg
From: Adrien Schildknecht FILE_DIRECT is working fine and offers faster results and lower memory footprint. Removing FILE_CACHE makes our life easier because we don't have to maintain 2 differents function that does the same thing. Signed-off-by: Adrien Schildknecht Signed-off-by: D