suppress errors when updating dirty.
Signed-off-by: Tetsuhiro Kohada
---
fs/fat/dir.c | 2 +
fs/fat/fat.h | 4 ++
fs/fat/fatent.c | 8 +++-
fs/fat/file.c| 1 +
fs/fat/inode.c | 100 +++
fs/fat/misc.c| 1 +
fs
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 +
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
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 v4
- no change
Changes in v3
- no change
Changes in v2
- no change
fs/exfat/exfat_fs.h | 2
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()
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
"aggregate dir-entry updates into
__exfat_write_inode()"
BR
---
Tetsuhiro Kohada
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
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
ther?
I think I explained the reason for each implementation.
If it's not enough, I'd like to explain it in more detail.
BR
---
Tetsuhiro Kohada
.
I am waiting 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
lean up.
I understand that a small patch is desirable, but the latter has "two similar
functions".
Which is better for you to review the patch?
BR
---
Tetsuhiro Kohada
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
lesize' and
add 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 +++--
f
lesize' and
add 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 inserti
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
y via dir_entry->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.
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
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
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 a
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
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
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 ++-
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 change
goto 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
7; by checksum is much higher)
So as I suggested earlier, You can make it
with 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
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]
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 on
using 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 dupl
hange 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 c
ries.
Pre-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
- Verifi
ion in this function?
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
I'll add 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
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
the offset and cluster number aren't
linked.
BTW, this patch 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
entry.file.modify_date,
- ep->dentry.file.modify_time_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, &info->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
s dir-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 +
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 i
hange 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
-
eters.
** 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 mes
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 failure
chksum != le16_to_cpu(es->de_file->checksum
Please add error print log if checksum mismatch error happen.
OK.
I'll add in v2.
BR
---
Tetsuhiro Kohada
gh 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
eam could be strongly typed.
I don't think we need excessive flexibility.
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
next time and are no longer the "minimum cost".
Should I add this to the commit-message?
BR
---
Tetsuhiro Kohada
g 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: T
s dir-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
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/
hange 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/e
using 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/d
ries.
Pre-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 verificat
+ 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
ys ...
Clear 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_d
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
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/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 functional
buffer() is executed?
BR
---
Tetsuhiro Kohada
OLUME_DIRTY.
b) Set MEDIA_FAILUR.
c) Do not 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
fied.
This will also 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
ere is no write operation.
:-) 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
ys ...
Clear 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
fied.
This will also 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.
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
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 on
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 &
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 exf
diaFailure is more appropriate.
BR
---
Tetsuhiro Kohada
eared by 'sync'.
Is my description 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
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 on
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-
eturn 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
--
Y.
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
Change
Y.
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
eturn 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 ++--
Y.
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/
en updating dir-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
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/di
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 &
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
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
e cleared.
Signed-off-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 chan
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
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
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-
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
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:
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 filesyst
[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, befor
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 I
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
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
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
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] e
> 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 latter:
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 su
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.
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
1 - 100 of 102 matches
Mail list logo