lkml.org 
[lkml]   [2020]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] exfat: retain 'VolumeFlags' properly
From
Date
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@gmail.com/#t

BR
---
Tetsuhiro Kohada <kohada.t2@gmail.com>
>

\
 
 \ /
  Last update: 2020-07-31 03:31    [W:0.050 / U:1.692 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site