t;aggregate dir-entry updates into
__exfat_write_inode()"
BR
---
Tetsuhiro Kohada
+ i = 2;
+ while ((ep = exfat_get_validated_dentry(es, i++, TYPE_NAME))) {
As Sungjong said, I think that TYPE_NAME seems right to be validated in
exfat_get_dentry_set().
First, it is possible to correctly determine that "Immediately follow the
Stream Extension directory
entry
-Validated 'file' and 'stream-ext' dir-entries are provided as member
variables of exfat_entry_set_cache.
And, rename TYPE_EXTEND to TYPE_NAME.
Suggested-by: Sungjong Seo
Suggested-by: Namjae Jeon
Signed-off-by: Tetsuhiro Kohada
---
Changes in v2
- Change verification order
- Verification loop
exfat_entry_set_cache and
exfat_get_uniname_from_name_entries(), like exfat_readdir().
And, remove unused functions/parameters.
** This patch depends on:
'[PATCH v3] exfat: integrates dir-entry getting and validation'.
Signed-off-by: Tetsuhiro Kohada
---
fs/exfat/dir.c | 161
to get the information of file/stream-ext dir-entries
via the member variable of exfat_entry_set_cache.
** This patch depends on:
'[PATCH v3] exfat: integrates dir-entry getting and validation'.
Signed-off-by: Tetsuhiro Kohada
---
fs/exfat/dir.c | 81
Integrate exfat_sync_inode() and mark_inode_dirty() as exfat_update_inode()
Also, return the result of _exfat_write_inode () when sync is specified.
Signed-off-by: Tetsuhiro Kohada
---
Changes in v3
- no change
Changes in v2
- no change
fs/exfat/exfat_fs.h | 2 +-
fs/exfat/file.c | 5
ate().
- In __exfat_write_inode(), rename 'on_disk_size' to 'filesize' and
add adjustment when filesize is 0.
Signed-off-by: Tetsuhiro Kohada
---
Changes in v3
- Remove update_inode() in exfat_map_cluster()/exfat_truncate()
- Update commit-message
Changes in v2
- Fix endian issue
fs/exfat/file.c |
at a small patch is desirable, but the latter has "two similar
functions".
Which is better for you to review the patch?
BR
---
Tetsuhiro Kohada
for your reply about "integrates dir-entry getting and
validation" patch.
As I know, your patch is being under review by Namjae.
OK.
I'll discuss it with him.
If possible, please let me know your opinion.
BR
---
Tetsuhiro Kohada
n.
If it's not enough, I'd like to explain it in more detail.
BR
---
Tetsuhiro Kohada
->entry.
Signed-off-by: Tetsuhiro Kohada
---
Changes in v2
- 'cpos' point to the next of entry-set
- return the index of dir-entry via dir_entry->entry
- fix commit-message
fs/exfat/dir.c | 21 +
fs/exfat/exfat_fs.h | 2 --
fs/exfat/file.c | 2 --
fs/exfat/i
-Validated 'file' and 'stream-ext' dir-entries are provided via
ES_FILE/ES_STREAM macros.
And, rename TYPE_EXTEND to TYPE_NAME.
Suggested-by: Sungjong Seo
Suggested-by: Namjae Jeon
Signed-off-by: Tetsuhiro Kohada
---
Changes in v2
- Change verification order
- Verification loop start with index 2
to get the information of file/stream-ext dir-entries
via the member variable of exfat_entry_set_cache.
Signed-off-by: Tetsuhiro Kohada
---
Changes in v2
- Add error check when extracting name
- Change error from EIO to EINVAL when the name length is invalid
- Correct the spelling in commit
exfat_entry_set_cache and
exfat_get_uniname_from_name_entries(), like exfat_readdir().
And, remove unused functions/parameters.
Signed-off-by: Tetsuhiro Kohada
---
Changes in v2
- Add error check when extracting name
- Remove temporary exfat_get_dentry_set() with ES_2_ENTRIES
- Remove duplicate
Currently exfat_free_dentry_set() writes all of dir-entry set.
Change it to write only the modified part of dir-entry set.
And, Integrate exfat_free_dentry_set() and
exfat_update_dir_chksum_with_entry_set() as exfat_put_dentry_set().
Signed-off-by: Tetsuhiro Kohada
---
Changes in v2
- Based
Add checksum validation for dir-entry set when getting it.
exfat_calc_entry_set_chksum_with() also validates entry-type.
Signed-off-by: Tetsuhiro Kohada
---
Changes in v2
- Add error log if checksum mismatch
Changes in v3:
- Nothing
Changes in v4:
- Into patch series '[PATCH v4] exfat
h an argument flags so that we skip the validation.
No need skip the validation, I think.
The run-time costs for validation are pretty low.
The reason I want to remove the validation is because I want to keep the code
simple.
(KISS principle)
BR
---
Tetsuhiro Kohada
free_es;
Why do you unnecessarily check entries with two loops?
Please refer to the patch I sent.
This order is possible.
However, TYPE_SECONDARY loop will be back as checksum loop.
In the next patch, I can fix the 'TYPE_SECONDARY loop' order.
do you need it?
BR
---
Tetsuhiro Kohada
the name from Name dir-entries to extract
correct name.
And, change to get the information of file/stream-ext dir-entries via the
member variable of exfat_entry_set_cache.
** This patch depends on:
'[PATCH v3] exfat: integrates dir-entry getting and validation'.
Signed-off-by: Tetsuhiro Kohada
the "minimum cost".
Should I add this to the commit-message?
BR
---
Tetsuhiro Kohada
When should VOL_DIRTY be cleared?
The current behavior is ...
Case of mkdir, rmdir, rename:
- set VOL_DIRTY before operation
- set VOL_CLEAN after operating.
In async mode, it is actually written to the media after 30 seconds.
Case of cp, touch:
- set VOL_DIRTY before operation
m could be strongly typed.
I don't think we need excessive flexibility.
BR
---
Tetsuhiro Kohada
enough to validate the name when it is needed.
This is a file-system driver, not fsck.
Validation is possible in exfat_get_dentry_set(), but unnecessary.
Why do you want to validate the name in exfat_get_dentry_set()?
BR
---
Tetsuhiro Kohada
hecksum
Please add error print log if checksum mismatch error happen.
OK.
I'll add in v2.
BR
---
Tetsuhiro Kohada
Remove 'rwoffset' in exfat_inode_info and replace it with the parameter(cpos)
of exfat_readdir.
Since rwoffset of is referenced only by exfat_readdir, it is not necessary a
exfat_inode_info's member.
Signed-off-by: Tetsuhiro Kohada
---
fs/exfat/dir.c | 16 ++--
fs/exfat
Integrate exfat_sync_inode() and mark_inode_dirty() as exfat_update_inode()
Also, return the result of _exfat_write_inode () when sync is specified.
Signed-off-by: Tetsuhiro Kohada
---
Changes in v2
- no change
fs/exfat/exfat_fs.h | 2 +-
fs/exfat/file.c | 5 +
fs/exfat/inode.c
adjustment when filesize is 0.
Reported-by: kernel test robot
Signed-off-by: Tetsuhiro Kohada
---
Changes in v2
- Fix endian issue
fs/exfat/file.c | 49 +---
fs/exfat/inode.c | 42 +++--
fs/exfat/namei.c | 26
There is nothing in directory just created, so there is no need to scan.
Signed-off-by: Tetsuhiro Kohada
---
fs/exfat/namei.c | 11 +--
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/fs/exfat/namei.c b/fs/exfat/namei.c
index b966b9120c9c..803748946ddb 100644
--- a/fs
In exfat_move_file(), the identity of source and target directory has been
checked by the caller.
Also, it gets stream.start_clu from file dir-entry, which is an invalid
determination.
Signed-off-by: Tetsuhiro Kohada
---
fs/exfat/namei.c | 5 -
1 file changed, 5 deletions(-)
diff --git
Use structure assignment instead of memcpy.
Signed-off-by: Tetsuhiro Kohada
---
fs/exfat/dir.c | 7 ++-
fs/exfat/inode.c | 2 +-
fs/exfat/namei.c | 15 +++
3 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/fs/exfat/dir.c b/fs/exfat/dir.c
index fa5bb72aa295
On 2020/09/12 14:01, Sungjong Seo wrote:
Remove 'rwoffset' in exfat_inode_info and replace it with the
parameter(cpos) of exfat_readdir.
Since rwoffset of is referenced only by exfat_readdir, it is not
necessary a exfat_inode_info's member.
Signed-off-by: Tetsuhiro Kohada
---
fs/exfat
Or do you mean the codes on vfs?
You can find in do_renameat2(). --- around 'fs/namei.c:4440'
If the destination ancestors are itself, our driver will not be called.
BTW
Are you busy now?
I am waiting for your reply about "integrates dir-entry getting and validation"
patch.
BR
---
Tetsuhiro Kohada
The hint provided by exfat_hint_femp is that the cluster number is enough,
so replace exfat_chain with the cluster number.
Signed-off-by: Tetsuhiro Kohada
---
fs/exfat/dir.c | 3 +--
fs/exfat/exfat_fs.h | 2 +-
fs/exfat/namei.c| 19 ++-
3 files changed, 8 insertions
Move 'getting dir-entries information' from exfat_find() to
exfat_find_dir_entry(), and make it common in exfat_readdir().
And, remove unused parameter in exfat_find_dir_entry().
Signed-off-by: Tetsuhiro Kohada
---
fs/exfat/dir.c | 75 +
fs/exfat
cs);
+ ES_FILE(es).modify_tz,
+ ES_FILE(es).modify_time,
+ ES_FILE(es).modify_date,
+ ES_FILE(es).modify_time_cs);
exfat_get_entry_time(sbi, >atime,
- ep->dentry.file.access_tz,
- ep->dentry.file.access_time,
- ep->dentry.file.access_date,
+ ES_FILE(es).access_tz,
+ ES_FILE(es).access_time,
+ ES_FILE(es).access_date,
0);
exfat_free_dentry_set(es, false);
BR
---
Tetsuhiro Kohada
is not related to the hint code.
I think it would be better to keep the original code in this patch and improve
it with a separate patch.
I think so, too.
I'll try another patch.
BR
---
Tetsuhiro Kohada
Fix missing result check of exfat_build_inode().
And use PTR_ERR_OR_ZERO instead of PTR_ERR.
Signed-off-by: Tetsuhiro Kohada
---
fs/exfat/namei.c | 13 ++---
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/fs/exfat/namei.c b/fs/exfat/namei.c
index 2aff6605fecc
TYPE_NAME verification after checksum verification, in next patch.
However, I think it is enough to validate TYPE_NAME when extracting name.
Could you please tell me why you think you need TYPE_NAME validation here?
BR
---
Tetsuhiro Kohada
tion?
What kind of problem are you worried about if this function does not validate
TYPE_NAME?
(for preserve the current behavior?)
Don't worry, I will add TYPE_NAME verification to the v4 patch.
I will post it later today.
BR
---
Tetsuhiro Kohada
.
** This patch depends on:
'[PATCH v3] exfat: integrates dir-entry getting and validation'.
Signed-off-by: Tetsuhiro Kohada
---
Changes in v2
- Add error check when extracting name
- Remove temporary exfat_get_dentry_set() with ES_2_ENTRIES
- Remove duplicate parts in commit message
fs/exfat
to get the information of file/stream-ext dir-entries
via the member variable in exfat_entry_set_cache.
** This patch depends on:
'[PATCH v3] exfat: integrates dir-entry getting and validation'.
Suggested-by: Sungjong Seo
Signed-off-by: Tetsuhiro Kohada
---
Changes in v2
- Add error check
-entry getting and validation'
'[PATCH v2] exfat: add NameLength check when extracting name'
'[PATCH v2] exfat: unify name extraction'
Signed-off-by: Tetsuhiro Kohada
---
Changes in v2
- Based on v2 'name-length' patches
fs/exfat/dir.c | 31 +++
fs/exfat
Add checksum validation for dir-entry set when getting it.
exfat_calc_entry_set_chksum_with() also validates entry-type.
** This patch depends on:
'[PATCH v3] exfat: integrates dir-entry getting and validation'
Signed-off-by: Tetsuhiro Kohada
---
Changes in v2
- Add error log if checksum
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
---
fs/exfat/dir.c | 1 -
fs/exfat/namei.c | 120 +++
2 files changed, 47
Thank you for your reply.
Most of the NAND flash devices and HDDs have wear leveling and bad sector
replacement algorithms
applied.
So I think that the life of the boot sector will not be exhausted first.
I'm not too worried about the life of the boot-sector.
I'm worried about write
Add checksum validation for dir-entry set when getting it.
exfat_calc_dir_chksum_with_entry_set() also validates entry-type.
** This patch depends on:
'[PATCH v3] exfat: integrates dir-entry getting and validation'
Signed-off-by: Tetsuhiro Kohada
---
fs/exfat/dir.c | 34
-entry getting and validation'
'[PATCH] exfat: add NameLength check when extracting name'
'[PATCH] exfat: unify name extraction'
Signed-off-by: Tetsuhiro Kohada
---
fs/exfat/dir.c | 33 -
fs/exfat/exfat_fs.h | 4 +---
fs/exfat/file.c | 3 +--
fs/exfat
Integrate exfat_sync_inode() and mark_inode_dirty() as exfat_update_inode()
Also, return the result of _exfat_write_inode () when sync is specified.
Signed-off-by: Tetsuhiro Kohada
---
fs/exfat/exfat_fs.h | 2 +-
fs/exfat/file.c | 5 +
fs/exfat/inode.c| 9 +++--
fs/exfat
adjustment when filesize is 0.
Signed-off-by: Tetsuhiro Kohada
---
fs/exfat/file.c | 49 +---
fs/exfat/inode.c | 42 +++--
fs/exfat/namei.c | 26 +
3 files changed, 21 insertions(+), 96 deletions
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.
Signed-off-by: Tetsuh
> 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 checking in another patch?
The
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: optimize dir-cache
2. [PATCH 1/4]
Aggregate PBR related definitions and redefine as "boot_sector" to comply
with the exFAT specification.
And, rename variable names including 'pbr'.
Signed-off-by: Tetsuhiro Kohada
---
Changes in v2:
- rebase with patch 'optimize dir-cache' applied
fs/exfat/exfat_fs.h | 2 +-
Separate the boot sector analysis to read_boot_sector().
Furthermore, add a strict consistency check, because overlapping areas
can cause serious corruption.
Signed-off-by: Tetsuhiro Kohada
---
Changes in v2:
- rebase with patch 'optimize dir-cache' applied
fs/exfat/exfat_raw.h | 1 +
fs
Add Boot-Regions verification specified in exFAT specification.
Note that the checksum type is strongly related to the raw structure,
so the'u32 'type is used to clarify the number of bits.
Signed-off-by: Tetsuhiro Kohada
---
Changes in v2:
- rebase with patch 'optimize dir-cache' applied
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
---
Changes in v2:
- rebase with patch
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 boot_sector.
However, the dir-cache patch hasn't changed, so
[snip]
+/* EXFAT: Main and Backup Boot Sector (512 bytes) */ struct boot_sector
+{
+ __u8jmp_boot[BOOTSEC_JUMP_BOOT_LEN];
+ __u8oem_name[BOOTSEC_OEM_NAME_LEN];
According to the exFAT specification, fs_name and BOOTSEC_FS_NAME_LEN look
better.
Oops.
I sent v2 patches,
Aggregate PBR related definitions and redefine as "boot_sector" to comply
with the exFAT specification.
And, rename variable names including 'pbr'.
Signed-off-by: Tetsuhiro Kohada
---
fs/exfat/exfat_fs.h | 2 +-
fs/exfat/exfat_raw.h | 79 +++--
Separate the boot sector analysis to read_boot_sector().
Furthermore, add a strict consistency check, because overlapping areas
can cause serious corruption.
Signed-off-by: Tetsuhiro Kohada
---
fs/exfat/exfat_raw.h | 1 +
fs/exfat/super.c | 96
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
---
fs/exfat/dir.c | 12
Add Boot-Regions verification specified in exFAT specification.
Note that the checksum type is strongly related to the raw structure,
so the'u32 'type is used to clarify the number of bits.
Signed-off-by: Tetsuhiro Kohada
---
fs/exfat/exfat_fs.h | 1 +
fs/exfat/misc.c | 14
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 succeeded at 508 (offset -5 lines).
Hunk #4 FAILED at 600.
Hunk #5
I'll make another small patch, OK?
No, It make sense to make v3, because you have renamed the variables in
boot_sector on this patch.
OK.
BTW
I have a concern about fs_name.
The exfat specification says that this field is "EXFAT".
I think it's a important field for determining the
Aggregate PBR related definitions and redefine as "boot_sector" to comply
with the exFAT specification.
And, rename variable names including 'pbr'.
Signed-off-by: Tetsuhiro Kohada
---
Changes in v2:
- rebase with patch 'optimize dir-cache' applied
Changes in v3:
- rename BOOTSEC_OE
Add Boot-Regions verification specified in exFAT specification.
Note that the checksum type is strongly related to the raw structure,
so the'u32 'type is used to clarify the number of bits.
Signed-off-by: Tetsuhiro Kohada
---
Changes in v2:
- rebase with patch 'optimize dir-cache' applied
Separate the boot sector analysis to read_boot_sector().
And add a check for the fs_name field.
Furthermore, add a strict consistency check, because overlapping areas
can cause serious corruption.
Signed-off-by: Tetsuhiro Kohada
---
Changes in v2:
- rebase with patch 'optimize dir-cache
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
---
Changes in v2:
- rebase with patch
Add Boot-Regions verification specified in exFAT specification.
Note that the checksum type is strongly related to the raw structure,
so the'u32 'type is used to clarify the number of bits.
Signed-off-by: Tetsuhiro Kohada
---
Changes in v2:
- rebase with patch 'optimize dir-cache' applied
Ping..
On 2020/07/15 19:06, Tetsuhiro Kohada wrote:
It looks complicated. It would be better to simply set/clear VOLUME DIRTY bit.
I think exfat_set_vol_flags() gets a little complicated,
because it needs the followings (with bit operation)
a) Set/Clear VOLUME_DIRTY.
b) Set MEDIA_FAILUR
On 2020/07/30 15:59, Namjae Jeon wrote:
Ping..
Hi Tetsuhiro,
Thank you for your reply.
On 2020/07/15 19:06, Tetsuhiro Kohada wrote:
It looks complicated. It would be better to simply set/clear VOLUME DIRTY bit.
I think exfat_set_vol_flags() gets a little complicated, because it
needs
the value of the VolumeDirty field to 0, if its value prior to the
first step was 0
Therefore, should not clear VolumeDirty when mounted.
Also, rename ERR_MEDIUM to MEDIA_FAILURE.
Signed-off-by: Tetsuhiro Kohada
---
Changes in v2
- Add exfat_set_volume_dirty() & exfat_clear_volume_dirty()
- Rename vol
Replace part of exfat_zeroed_cluster() with exfat_update_bhs().
And remove exfat_sync_bhs().
Signed-off-by: Tetsuhiro Kohada
---
Changes in v2
- Rebase to latest exfat-dev
fs/exfat/fatent.c | 53 +--
1 file changed, 10 insertions(+), 43 deletions
On 2020/07/15 10:22, Tetsuhiro Kohada wrote:
Add validation for num, bh and type on getting dir-entry.
('file' and 'stream-ext' dir-entries are pre-validated to ensure success)
Renamed exfat_get_dentry_cached() to exfat_get_validated_dentry() due to
a change in functionality.
Integrate type
recognize a dir-entry set that contains 'benign secondary'
dir-entries.
And, rename TYPE_EXTEND to TYPE_NAME.
Suggested-by: Sungjong Seo
Signed-off-by: Tetsuhiro Kohada
---
Changes in v2
- Change verification order
- Verification loop start with index 2
fs/exfat/dir.c | 144
change other flags.
d) Retain VOLUME_DIRTY/MEDIA_FAILUR as it is when mounted.
'vol_flags_noclear' is used for d).
Bit-by-bit operation makes the code redundant.
I think it's not a bad way to handle multiple bits.
What do you think?
BR
---
Tetsuhiro Kohada
buffer() is executed?
BR
---
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.
Suggested-by: Namjae Jeon
Signed-off-by: Tetsuhiro Kohada
---
Changes in v2:
- Split into 'write
Add error check when synchronously updating dir-entries.
Suggested-by: Namjae Jeon
Suggested-by: Sungjong Seo
Signed-off-by: Tetsuhiro Kohada
---
Changes in v2:
- Split into 'write multiple sectors at once'
and 'add error check when updating dir-entries'
fs/exfat/dir.c | 3 ++-
fs
-entries'.
The other two patches(2nd & 3rd) are no-changed, so have not been sent.
If you need the other two patches, I will send them.
In that case, please tell me how to write the subject and change-log.
BR
---
Tetsuhiro Kohada
the value of the VolumeDirty field to 0, if its value prior to the
first step was 0
Therefore, should not clear VolumeDirty when mounted.
Also, rename ERR_MEDIUM to MED_FAILURE.
Signed-off-by: Tetsuhiro Kohada
---
fs/exfat/exfat_fs.h | 5 +++--
fs/exfat/exfat_raw.h | 2 +-
fs/exfat/super.
.
:-) sync-fs makes it clean and ejectable immidiately.
:-( It remains dirty unless sync-fs or unmount.
:-( Frequent sync-fs will increases writes to boot-sector.
I think it should be (C) or(D).
What do you think?
BR
---
Tetsuhiro Kohada
recognize a dir-entry set that contains 'benign secondary'
dir-entries.
And, rename TYPE_EXTEND to TYPE_NAME.
Suggested-by: Sungjong Seo
Signed-off-by: Tetsuhiro Kohada
---
fs/exfat/dir.c | 144 ++--
fs/exfat/exfat_fs.h | 15 +++--
fs/exfat/file.c
Add error check when synchronously updating dir-entries.
Suggested-by: Sungjong Seo
Signed-off-by: Tetsuhiro Kohada
---
Changes in v2:
- Split into 'write multiple sectors at once'
and 'add error check when updating dir-entries'
Changes in v3
- Rebase to latest exfat-dev
fs/exfat/dir.c
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
---
Changes in v2:
- Split into 'write multiple sectors at once
insufficient?
BTW
Even with this patch applied, VOL_DIRTY remains until synced in the above case.
It's not easy to reproduce as rmdir, but I'll try to fix it in the future.
BR
---
Tetsuhiro Kohada
---
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
Signed-off-by: Tetsuhiro Kohada
---
Changes in v2:
- Split into 'write
Add error check when synchronously updating dir-entries.
Suggested-by: Sungjong Seo
Signed-off-by: Tetsuhiro Kohada
---
Changes in v2:
- Split into 'write multiple sectors at once'
and 'add error check when updating dir-entries'
Changes in v3
- Rebase to latest exfat-dev
Changes in v4
.
If performe 'sync' in this state, VOL_DIRTY will not be cleared.
Remove the EXFAT_SB_DIRTY check to ensure synchronization.
And, remove the code related to the flag.
Signed-off-by: Tetsuhiro Kohada
---
fs/exfat/balloc.c | 4 ++--
fs/exfat/dir.c | 16
fs/exfat/exfat_fs.h | 5
error without setting EXFAT_SB_DIRTY.
If performe 'sync' in this state, VOL_DIRTY will not be cleared.
Remove the EXFAT_SB_DIRTY check to ensure synchronization.
And, remove the code related to the flag.
Signed-off-by: Tetsuhiro Kohada
---
fs/exfat/balloc.c | 4 ++--
fs/exfat/dir.c
Add error check when synchronously updating dir-entries.
Furthermore, add exfat_update_bhs(). It wait for write completion once
instead of sector by sector.
Suggested-by: Sungjong Seo
Signed-off-by: Tetsuhiro Kohada
---
fs/exfat/dir.c | 15 +--
fs/exfat/exfat_fs.h | 3 ++-
fs
-by: Tetsuhiro Kohada
---
fs/exfat/balloc.c | 4 ++--
fs/exfat/dir.c | 18 --
fs/exfat/exfat_fs.h | 2 +-
fs/exfat/fatent.c | 6 +-
fs/exfat/misc.c | 3 +--
fs/exfat/namei.c| 12 ++--
fs/exfat/super.c| 3 +++
7 files changed, 22 insertions(+), 26
Replace part of exfat_zeroed_cluster() with exfat_update_bhs().
And remove exfat_sync_bhs().
Signed-off-by: Tetsuhiro Kohada
---
fs/exfat/fatent.c | 54 ++-
1 file changed, 11 insertions(+), 43 deletions(-)
diff --git a/fs/exfat/fatent.c b/fs/exfat
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
---
Changes in v2:
- Split into 'write multiple sectors at once
.
If performe 'sync' in this state, VOL_DIRTY will not be cleared.
Remove the EXFAT_SB_DIRTY check to ensure synchronization.
And, remove the code related to the flag.
Suggested-by: Sungjong Seo
Signed-off-by: Tetsuhiro Kohada
---
Changes in v2:
- exfat_sync_fs() avoids synchronous processing when
.
If performe 'sync' in this state, VOL_DIRTY will not be cleared.
Remove the EXFAT_SB_DIRTY check to ensure synchronization.
And, remove the code related to the flag.
Signed-off-by: Tetsuhiro Kohada
---
Changes in v2:
- exfat_sync_fs() avoids synchronous processing when wait=0
Changes in v3:
- fix
error without setting EXFAT_SB_DIRTY.
If performe 'sync' in this state, VOL_DIRTY will not be cleared.
Remove the EXFAT_SB_DIRTY check to ensure synchronization.
And, remove the code related to the flag.
Suggested-by: Sungjong Seo
Signed-off-by: Tetsuhiro Kohada
---
Changes in v2
ze_read(inode),
+ (clu_offset << sbi->sect_per_clus_bits) * 512,
+ last_clu);
Is this leftover print from debugging?
Oops!
Yes, just as you said.
I will post V4 soon.
Is there any other problem?
BR
---
Tetsuhiro Kohada
ate().
- In __exfat_write_inode(), rename 'on_disk_size' to 'filesize' and
add adjustment when filesize is 0.
Reported-by: kernel test robot
Signed-off-by: Tetsuhiro Kohada
---
Changes in v4
- Remove debug message
Changes in v3
- Remove update_inode() in exfat_map_cluster()/exfat_truncate()
- Update commit-mess
1 - 100 of 102 matches
Mail list logo