Re: [PATCH 2/3] md: replace MD_DELETED with MD_CLOSING

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

在 2025/05/09 19:20, Xiao Ni 写道:
On Fri, May 9, 2025 at 6:26 PM Yu Kuai <yukuai1@xxxxxxxxxxxxxxx> wrote:

Hi,

在 2025/05/09 18:20, Xiao Ni 写道:
On Fri, May 9, 2025 at 6:08 PM Yu Kuai <yukuai1@xxxxxxxxxxxxxxx> wrote:

Hi,

在 2025/05/09 17:33, Xiao Ni 写道:
The two places clear MD_CLOSING rather than setting MD_CLOSING.
MD_CLOSING is set when we really want to stop the array (STOP_ARRAY
cmd and clear>array_state_store). So the two places clear MD_CLOSING
for other situations which look good to me.

No, MD_CLOSING can be set first in the two cases, do something and then
be cleared, that's why I said temporarily.

So you mean mddev_get should pass in this case (between setting
MD_CLOSING and clearing MD_CLOSING)? It doesn't allow get mddev now
without this patch. This should be right.

I don't understand what you mean "It doesn't allow get mddev now without
this patch", for example, the ioctl STOP_ARRAY_RO will set MD_CLOSING
temporarily, but never set MD_DELETED, mddev_get() can always pass.

You're right. I thought of the md_open path and it checks MD_CLOSING.
There is a short window that will fail to open sysfs files. I want to
make things easier and clearer here: it can't get mddev when
MD_CLOSING is set. Is there any problem if we use this rule?

What I can think of is that during the window, user can't access this
array through sysfs or /proc/mdstat after this patch. We'd better not
introduce new restrictions for user, unless we're 100% sure they won't
be affected.

Thanks,
Kuai


Regards
Xiao

Thanks,
Kuai


Regardes
Xiao


Thanks,
Kuai



.




.






[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux