. and this command also has same limitation as FALLOC_FL_COLLAPSE_RANGE,
that is block boundary and use ftruncate(2) for crosses EOF.
Signed-off-by: Namjae Jeon
Signed-off-by: Ashish Sangwan
---
fs/open.c | 8 ++--
include/linux/falloc.h | 6 ++
include/uapi/linux
This commit adds fallocate FALLOC_FL_INSERT_RANGE support for fsx.
Signed-off-by: Namjae Jeon
Signed-off-by: Ashish Sangwan
Reviewed-by: Brian Foster
---
ltp/fsx.c | 124 -
1 file changed, 114 insertions(+), 10 deletions(-)
diff
ock of the extent, split the extent
such that the block number is the starting block of the extent.
4) Shift all the extents which are lying bewteen [offset, last allocated extent]
towards right by len bytes. This step will make a hole of len bytes
at offset.
Signed-off-by: Namjae Jeon
Sig
We are excited to see this happening and would like to state that we appreciate
time and
effort which people put into upstreaming exfat. Thank you!
However, if possible, can we step back a little bit and re-consider it? We
would prefer to
see upstream the code which we are currently using in our p
I've summarized some of the big differences between sdfat and exfat
in linux-next.
1. sdfat has been refactored to improve compatibility, readability and
to be linux friendly.(included support mass storages larger than 2TB.)
2. sdfat has been optimized for the performance of SD-cards.
- Support
> [..]
> > Put it in drivers/staging/sdfat/.
> >
> > But really we want someone from Samsung to say that they will treat
> > the staging version as upstream. It doesn't work when people apply
> > fixes to their version and a year later back port the fixes into
> > staging. The staging tree is g
[..]
> Put it in drivers/staging/sdfat/.
>
> But really we want someone from Samsung to say that they will treat
> the staging version as upstream. It doesn't work when people apply
> fixes to their version and a year later back port the fixes into
> staging. The staging tree is going to have to
> If the second exfat_get_dentry() call fails then we need to release "old_bh"
> before returning. There
> is a similar bug in exfat_move_file().
>
> Fixes: 5f2aa075070c ("exfat: add inode operations")
> Reported-by: Markus Elfring
> Signed-off-by: Dan Carpenter
Applied. Thanks!
2020-05-27 16:39 GMT+09:00, Tetsuhiro Kohada :
> Thank you for your comment.
>
>> I can not apply this patch to exfat dev tree. Could you please check it ?
>> patching file fs/exfat/dir.c
>> Hunk #1 succeeded at 491 (offset -5 lines).
>> Hunk #2 succeeded at 500 (offset -5 lines).
>> Hunk #3 succee
2020-05-27 17:00 GMT+09:00,
kohada.tetsuh...@dc.mitsubishielectric.co.jp
:
> Thank you for your comment.
>
> >> +for (i = 0; i < es->num_bh; i++) {
> >> +if (es->modified)
> >> +exfat_update_bh(es->sb, es->bh[i], sync);
> >
> > Overall, it looks good to me.
> +struct exfat_dentry *exfat_get_dentry_cached(
> + struct exfat_entry_set_cache *es, int num);
You used a single tab for the continuing line of the prototype here.
We usually use two tabs for this.
> struct exfat_entry_set_cache *exfat_get_dentry_set(struct super_block *sb,
> - s
> >> II tried applying patch to dev-tree (4c4dbb6ad8e8).
> >> -The .patch file I sent
> >> -mbox file downloaded from archive
> >> But I can't reproduce the error. (Both succeed) How do you reproduce
> >> the error?
> > I tried to appy your patches in the following order.
> > 1. [PATCH] exfat: opti
> >>> > In order to prevent illegal accesses to bh and dentries, it
> >>> would be better to check validation for num and bh.
> >>>
> >>> There is no new error checking for same reason as above.
> >>>
> >>> I'll try to add error checking to this v2 patch.
> >>> Or is it better to add error
2020-05-28 19:09 GMT+09:00, Tetsuhiro Kohada :
>>> I'll repost the patch, based on the dir-cache patched dev-tree.
>>> If dir-cache patch will merge into dev-tree, should I wait until then?
>> I will apply them after testing at once if you send updated 5 patches
>> again.
>
> I resend patches for b
>
> if (((attr->ia_valid & ATTR_UID) &&
>!uid_eq(attr->ia_uid, sbi->options.fs_uid)) || @@ -322,6 +325,12
> @@ int
> exfat_setattr(struct dentry *dentry, struct iattr *attr)
> goto out;
You should remove goto statement and curly braces here to reach if error
condi
> > Replace part of exfat_zeroed_cluster() with exfat_update_bhs().
> > And remove exfat_sync_bhs().
> >
> > Signed-off-by: Tetsuhiro Kohada
>
> Reviewed-by: Sungjong Seo
>
> Looks good. Thanks.
Pushed it into exfat #dev.
Thanks!
FileName field to the value h
Hyunchul Lee (1):
exfat: call sync_filesystem for read-only remount
Namjae Jeon (1):
exfat: move setting VOL_DIRTY over exfat_remove_entries()
Sungjong Seo (1):
exfat: flush dirty metadata in fsync
fs/exfat/dir.c | 12 +++-
fs/exfat
Hi Hyunchul,
> We need to commit dirty metadata and pages to disk before remounting exfat as
> read-only.
>
> This fixes a failure in xfstests generic/452
Could you please elaborate more the reason why generic/452 in xfstests failed ?
>
> Signed-off-by: Hyunchul Lee
> ---
> fs/exfat/super.c |
> Allow to change permission masks, allow_utime, errors. But ignore other
> options.
>
> Signed-off-by: Hyunchul Lee
> ---
> fs/exfat/super.c | 40 +---
> 1 file changed, 29 insertions(+), 11 deletions(-)
>
> diff --git a/fs/exfat/super.c b/fs/exfat/super.c
> Hi Namjae,
>
> 2020년 6월 15일 (월) 오전 9:14, Namjae Jeon 님이 작성:
> >
> > Hi Hyunchul,
> > > We need to commit dirty metadata and pages to disk before remounting
> > > exfat as read-only.
> > >
> > > This fixes a failure in xfstests gener
> @@ -1352,19 +1340,13 @@ static int exfat_rename(struct inode *old_dir, struct
> dentry *old_dentry,
> new_dir->i_ctime = new_dir->i_mtime = new_dir->i_atime =
> EXFAT_I(new_dir)->i_crtime = current_time(new_dir);
> exfat_truncate_atime(&new_dir->i_atime);
> - if (IS
> Second: Range validation and type validation should not be separated.
> When I started making this patch, I intended to add only range validation.
> However, after the caller gets the ep, the type validation follows.
> Get ep, null check of ep (= range verification), type verification is a
> ser
> On 2020/08/26 10:03, Namjae Jeon wrote:
> >> Second: Range validation and type validation should not be separated.
> >> When I started making this patch, I intended to add only range validation.
> >> However, after the caller gets the ep, the type validation follo
> Thank you for quick reply!
>
> On 2020/08/26 13:19, Namjae Jeon wrote:
> >> On 2020/08/26 10:03, Namjae Jeon wrote:
> >>>> Second: Range validation and type validation should not be separated.
> >>>> When I started making this patch,
> Fix missing result check of exfat_build_inode().
> And use PTR_ERR_OR_ZERO instead of PTR_ERR.
>
> Signed-off-by: Tetsuhiro Kohada
Pushed it to exfat #dev.
Thanks for your patch!
> + i = ES_INDEX_NAME;
> + while ((ep = exfat_get_validated_dentry(es, i++, TYPE_NAME))) {
Please find the way to access name entries like ep_file, ep_stream
without calling exfat_get_validated_dentry().
> exfat_extract_uni_name(ep, uniname);
> uniname += EXFAT_F
)
Description for this pull request:
- Fix use of uninitialized spinlock on error path.
- Fix missing err assignment in exfat_build_inode().
Namjae Jeon (1):
exfat: fix use of
> > >> --- a/fs/exfat/namei.c
> > >> +++ b/fs/exfat/namei.c
> > >> @@ -1095,11 +1095,6 @@ static int exfat_move_file(struct inode
> > >> *inode, struct exfat_chain *p_olddir,
> > >> if (!epmov)
> > >> return -EIO;
> > >>
> > >> -/* check if the source and target di
[snip]
> +static int exfat_verify_boot_region(struct super_block *sb) {
> + struct buffer_head *bh = NULL;
> + u32 chksum = 0, *p_sig, *p_chksum;
> + int sn, i;
> +
> + /* read boot sector sub-regions */
> + for (sn = 0; sn < 11; sn++) {
> + bh = sb_bread(sb, sn);
>
> To clarify that it is a 16-bit checksum, the parts related to the 16-bit
> checksum are renamed and
> change type to u16.
> Furthermore, replace checksum calculation in exfat_load_upcase_table() with
> exfat_calc_checksum32().
>
> Signed-off-by: Tetsuhiro Kohada
I can not apply this patch to
> > Optimize directory access based on exfat_entry_set_cache.
> > - Hold bh instead of copied d-entry.
> > - Modify bh->data directly instead of the copied d-entry.
> > - Write back the retained bh instead of rescanning the d-entry-set.
> > And
> > - Remove unused cache related definitions.
> >
> On Tue, Jun 02, 2020 at 01:03:05PM +0800, butt3rflyh4ck wrote:
> > I report a bug (in linux-5.7.0-rc7) found by syzkaller.
> >
> > kernel config:
> > https://protect2.fireeye.com/url?k=f3a88a7d-ae6446d8-f3a90132-0cc47a30
> > d446-6021a2fbdd1681a8&q=1&u=https%3A%2F%2Fgithub.com%2Fbutterflyhack%2
>
From: Al Viro
butt3rflyh4ck reported memory leak found by syzkaller.
A param->string held by exfat_mount_options.
BUG: memory leak
unreferenced object 0x88801972e090 (size 8):
comm "syz-executor.2", pid 16298, jiffies 4295172466 (age 14.060s)
hex dump (first 8 bytes):
6b 6f 69 38 2
From: Al Viro
butt3rflyh4ck reported memory leak found by syzkaller.
A param->string held by exfat_mount_options.
BUG: memory leak
unreferenced object 0x88801972e090 (size 8):
comm "syz-executor.2", pid 16298, jiffies 4295172466 (age 14.060s)
hex dump (first 8 bytes):
6b 6f 69 38 2
> On Wed, Jun 03, 2020 at 10:29:57AM +0900, Namjae Jeon wrote:
>
> > exfat_free() should call exfat_free_iocharset() after stealing
> > param->string instead of kstrdup in exfat_parse_param().
>
> ITYM
> extfat_free() should call exfat_free_iocharset(), to pre
;)
Cc: sta...@vger.kernel.org # v5.7
Signed-off-by: Namjae Jeon
---
fs/exfat/file.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fs/exfat/file.c b/fs/exfat/file.c
index 8e3f0eef45d7..fce03f318787 100644
--- a/fs/exfat/file.c
+++ b/fs/exfat/file.c
@@ -171,11 +171,11 @@ int __exfa
> Set EXFAT_SB_DIRTY flag in exfat_put_super().
>
> In some cases, can't clear VOL_DIRTY with 'sync'.
> ex:
>
> VOL_DIRTY is set when rmdir starts, but when non-empty-dir is detected,
> return error without setting
> EXFAT_SB_DIRTY.
> If performe 'sync' in this state, VOL_DIRTY will not be clear
2020-06-06 18:22 GMT+09:00, Tetsuhiro Kohada :
> On 2020/06/05 16:32, Namjae Jeon wrote:
>>> Set EXFAT_SB_DIRTY flag in exfat_put_super().
>>>
>>> In some cases, can't clear VOL_DIRTY with 'sync'.
>>> ex:
>>>
>>> VOL_DIRTY
2020-06-04 17:44 GMT+09:00, Tetsuhiro Kohada :
Hi Tetsuhiro,
> Add error check when synchronously updating dir-entries.
> Furthermore, add exfat_update_bhs(). It wait for write completion once
> instead of sector by sector.
This patch can be split into two also ?
>
> Suggested-by: Sungjong Seo
> S
> > The exfat_find_dir_entry() called by exfat_find() doesn't return -EEXIST.
> > Therefore, the root-dir information setting is never executed.
> >
> > Signed-off-by: Tetsuhiro Kohada
>
> Acked-by: Sungjong Seo
Applied. Thanks for your work!
> We alreday has the interface i_blocksize() to get blocksize, so use it.
>
> Signed-off-by: Xianting Tian
Pushed it into exfat #dev. Thanks for your patch!
> Thank you for your reply.
>
> > > diff --git a/fs/exfat/dir.c b/fs/exfat/dir.c index
> > > 573659bfbc55..09b85746e760 100644
> > > --- a/fs/exfat/dir.c
> > > +++ b/fs/exfat/dir.c
> > > @@ -33,6 +33,7 @@ static void exfat_get_uniname_from_ext_entry(struct
> > > super_block *sb, {
> > > int i;
)
Description for this pull request:
- Replace memcpy with structure assignment.
- Remove unneeded codes and use helper function i_blocksize().
- Fix typos found by codespell.
Namjae Jeon (1
> Thank you for your reply.
>
> >> @@ -171,7 +174,9 @@ struct exfat_entry_set_cache {
> >>unsigned int start_off;
> >>int num_bh;
> >>struct buffer_head *bh[DIR_CACHE_SIZE];
> >> - unsigned int num_entries;
> >> + int num_entries;
> >> + struct exfat_de_file *de_file;
> >> + stru
> The stream.size field is updated to the value of create timestamp of the file
> entry. Fix this to use
> correct stream entry pointer.
>
> Fixes: 29bbb14bfc80 ("exfat: fix incorrect update of stream entry in
> __exfat_truncate()")
> Signed-off-by: Hyeongseok Kim
My bad, Pushed it into exfat #
> *inode) static int exfat_map_cluster(struct inode *inode, unsigned int
> clu_offset,
> unsigned int *clu, int create)
> {
> - int ret, modified = false;
> + int ret;
> unsigned int last_clu;
> struct exfat_chain new_clu;
> struct super_block *sb = inode-
> Thanks for your reply.
>
> > > Also, rename ERR_MEDIUM to MED_FAILURE.
> > I think that MEDIA_FAILURE looks better.
>
> I think so too.
> If so, should I change VOL_DIRTY to VOLUME_DIRTY?
Yes, maybe.
>
> > > -int exfat_set_vol_flags(struct super_block *sb, unsigned short
> > > new_flag)
> > >
2020-07-06 17:22 GMT+09:00, Ju Hyung Park :
> Hi Namjae.
Hi Juhyung,
>
> Looks like I ported this incorrectly from the previous sdFAT base.
>
> I'll fix, test again and send v2.
Okay:) Thanks!
>
> Thanks.
>
> On Thu, Jul 2, 2020 at 2:16 PM Namjae Jeon wrot
.
Hyeongseok Kim (1):
exfat: fix wrong size update of stream entry by typo
Ilya Ponetayev (1):
exfat: fix name_hash computation on big endian systems
Namjae Jeon (2):
exfat: fix overflow issue in exfat_cluster_to_sector()
exfat: fix wrong hint_stat
Hi Tetsuhiro,
> Retain ActiveFat, MediaFailure and ClearToZero fields.
> And, never clear VolumeDirty, if it is dirty at mount.
>
> In '3.1.13.3 Media Failure Field' of exfat specification says ...
> If, upon mounting a volume, the value of this field is 1, implementations
> which scan the ent
2020-09-15 19:22 GMT-07:00, Sungjong Seo :
>> There is nothing in directory just created, so there is no need to scan.
>>
>> Signed-off-by: Tetsuhiro Kohada
>
> Acked-by: Sungjong Seo
Applied. Thanks for your patch!
2020-09-15 19:23 GMT-07:00, Sungjong Seo :
>> Use structure assignment instead of memcpy.
>>
>> Signed-off-by: Tetsuhiro Kohada
>
> Acked-by: Sungjong Seo
Applied. Thanks for your patch!
> > Remove 'rwoffset' in exfat_inode_info and replace it with the
> > parameter of exfat_readdir().
> > Since rwoffset is referenced only by exfat_readdir(), it is not
> > necessary a exfat_inode_info's member.
> > Also, change cpos to point to the next of entry-set, and return the
> > index of dir
Move setting VOL_DIRTY over exfat_remove_entries() to avoid unneeded
leaving VOL_DIRTY on -ENOTEMPTY.
Fixes: 5f2aa075070c ("exfat: add inode operations")
Cc: sta...@vger.kernel.org # v5.7
Reported-by: Tetsuhiro Kohada
Reviewed-by: Sungjong Seo
Signed-off-by: Namjae Jeon
---
fs/exf
ernel.org # v5.7
Signed-off-by: Hyeongseok.Kim
Reviewed-by: Sungjong Seo
Signed-off-by: Namjae Jeon
---
fs/exfat/dir.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/fs/exfat/dir.c b/fs/exfat/dir.c
index 4b91afb0f051..349ca0c282c2 100644
--- a/fs/exfat/dir.c
+
-only, exfat doesn't
have a chance to commit metadata and
vfs invalidates page caches in a block device.
Fixes: 719c1e182916 ("exfat: add super block operations")
Cc: sta...@vger.kernel.org # v5.7
Signed-off-by: Hyunchul Lee
Acked-by: Sungjong Seo
Signed-off-by: Namjae Jeon
---
f
-only remount
Namjae Jeon (1):
exfat: move setting VOL_DIRTY over exfat_remove_entries()
Sungjong Seo (1):
exfat: flush dirty metadata in fsync
fs/exfat/dir.c | 12 +++-
fs/exfat/exfat_fs.h | 1 +
fs/exfat/file.c | 19 ++-
fs/exfat/namei.c| 14
and data pages for a file.
Fixes: 98d917047e8b ("exfat: add file operations")
Cc: sta...@vger.kernel.org # v5.7
Signed-off-by: Sungjong Seo
Signed-off-by: Namjae Jeon
---
fs/exfat/dir.c | 2 +-
fs/exfat/exfat_fs.h | 1 +
fs/exfat/file.c | 19 ++-
3 files c
Signed-off-by: Dan Carpenter
Signed-off-by: Namjae Jeon
---
fs/exfat/namei.c | 12 ++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/fs/exfat/namei.c b/fs/exfat/namei.c
index a2659a8a68a1..3bf1dbadab69 100644
--- a/fs/exfat/namei.c
+++ b/fs/exfat/namei.c
@@ -1089,10 +1
> Hi Namjae,
Hi Sasha,
>
> On Thu, Jul 02, 2020 at 08:20:19AM +0900, Namjae Jeon wrote:
> >Could you please push exfat stable patches into 5.7.y kernel tree ?
>
> I've queued them up, however it would be much easier if for commits that
> don't require any
>
> > We need to commit dirty metadata and pages to disk before remounting
> > exfat as read-only.
> >
> > This fixes a failure in xfstests generic/452
> >
> > generic/452 does the following:
> > cp something /
> > mount -o remount,ro
> >
> > the /something is corrupted. because while exfat is remou
> > remove EXFAT_SB_DIRTY flag and related codes.
> >
> > This flag is set/reset in exfat_put_super()/exfat_sync_fs() to avoid
> > sync_blockdev().
> > However ...
> > - exfat_put_super():
> > Before calling this, the VFS has already called sync_filesystem(), so
> > sync is never performed here.
>
Hi folk,
We have released exfatprogs-1.0.3 version.
Any feedback is welcome!:)
CHANGES :
* Rename label.exfat to tune.exfat.
* tune.exfat: change argument style(-l option for print level,
-L option for setting label)
* mkfs.exfat: harmonize set volume label option with tune.exfat.
NEW FEAT
> remove EXFAT_SB_DIRTY flag and related codes.
>
> This flag is set/reset in exfat_put_super()/exfat_sync_fs() to avoid
> sync_blockdev().
> However ...
> - exfat_put_super():
> Before calling this, the VFS has already called sync_filesystem(), so sync is
> never performed here.
> - exfat_sync_
2020-06-19 17:38 GMT+09:00, Tetsuhiro Kohada :
> Write multiple sectors at once when updating dir-entries.
> Add exfat_update_bhs() for that. It wait for write completion once
> instead of sector by sector.
> It's only effective if sync enabled.
>
> Reviewed-by: Christoph Hellwig
He didn't give re
> generic_file_fsync() exfat used could not guarantee the consistency of a file
> because it has flushed
> not dirty metadata but only dirty data pages for a file.
>
> Instead of that, use exfat_file_fsync() for files and directories so that it
> guarantees to commit both
> the metadata and data
> This code calls brelse(bh) and then dereferences "bh" on the next line
> resulting in a possible use
> after free. The brelse() should just be moved down a line.
>
> Fixes: b676fdbcf4c8 ("exfat: standardize checksum calculation")
> Signed-off-by: Dan Carpenter
Applied. Thanks!
> ---
> fs/exf
> Thank you for your comment.
>
> > >> Can you split this patch into two? (Don't set VOL_DIRTY on
> > >> -ENOTEMPTY and Setting EXFAT_SB_DIRTY is merged into
> > >> exfat_set_vol_flag). I need to check the second one more.
> > >
> > > Can't do that.
> > >
> > > exfat_set_vol_flag() is called when
EXFAT_DEFAULT_IOCHARSET config option
Jason Yan (1):
exfat: remove the assignment of 0 to bool variable
Joe Perches (1):
exfat: Use a more common logging style
Namjae Jeon (2):
exfat: remove unnecessary reassignment of p_uniname->name_len
exfat: fix incorrect update of str
> Write multiple sectors at once when updating dir-entries.
> Add exfat_update_bhs() for that. It wait for write completion once instead of
> sector by sector.
> It's only effective if sync enabled.
>
> Suggested-by: Namjae Jeon
> Signed-off-by: Tetsuhiro Koh
> Write multiple sectors at once when updating dir-entries.
> Add exfat_update_bhs() for that. It wait for write completion once instead of
> sector by sector.
> It's only effective if sync enabled.
>
> Signed-off-by: Tetsuhiro Kohada
Pushed your 2 patches to exfat #dev.
Thanks!
Hi Linus,
This is exfat fixes pull request for v5.7-rc7. I add description of
this pull request on below. Please pull exfat with following fixes.
Thanks!
The following changes since commit b9bbe6ed63b2b9f2c9ee5cbd0f2c946a2723f4ce:
Linux 5.7-rc6 (2020-05-17 16:48:37 -0700)
are available in th
901 - 972 of 972 matches
Mail list logo