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 followings (with bit operation)
a) Set/Clear VOLUME_DIRTY.
b) Set MEDIA_FAILUR.
How about splitting these into separate functions as below?
exfat_set_volume_dirty()
exfat_set_vol_flags(sb, sbi->vol_flag | VOLUME_DIRTY);
exfat_clear_volume_dirty()
exfat_set_vol_flags(sb, sbi->vol_flag & ~VOLUME_DIRTY);
Looks good.
exfat_set_media_failure()
exfat_set_vol_flags(sb, sbi->vol_flag | MEDIA_FAILURE);
Where will this function be called? We don't need to create unused functions in advance...
Sorry. I ran ahead without explaining.
I would like to set MEDIA_FAILURE when a format error is detected so that fsck will be run on the next mount.
This patch is the basis for setting MEDIA_FAILURE.
But, I have no reason to implement this right now, as you say.
I'll add it in a patch that sets MEDIA_FAILURE.
BTW
I would like your opinion on the timing of clearing VOLUME_DIRTY.
https://lore.kernel.org/linux-fsdevel/c635e965-6b78-436a-3959-e4777e1732c1@xxxxxxxxx/#t
BR
---
Tetsuhiro Kohada <kohada.t2@xxxxxxxxx>