396 Star 1.4K Fork 1.3K

GVPopenEuler / kernel

 / 详情

【openEuler-1.0-LTS】block: check 'bd_super' before rescanning partition

已完成
任务
创建于  
2023-01-29 14:50

This commit revert following three patches:

  1. commit 8551c3543624 ("block: remove the bd_openers checks in
    blk_drop_partitions")
  2. commit c14c928ea979 ("block: fix busy device checking in
    blk_drop_partitions again")
  3. commit db4eff3b44c8 ("block: fix busy device checking in
    blk_drop_partitions")

Before commit 8551c3543624 ("block: remove the bd_openers checks in
blk_drop_partitions"), if block device is opened already, rescan will fail
by checking bd_openers. And the commit remove such checking because
checking bd_openers is not logical, for example, if block device is
opened by someone else, rescan will always fail.

However, after the commit, we meet a problem that rescan a block device
with a mounted filesystem(ext4) will cause data lost. Since that mount
ext4 will set bd_super, fix the problem by checking bd_super instead of
bd_openers.

Noted that some filesystem(for example, ext4/xfs log device, btrfs) doesn't
set bd_super, such problem still exists.

评论 (1)

Yu Kuai 创建了任务

Hi hailan94, welcome to the openEuler Community.
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here.
If you have any questions, please contact the SIG: Kernel, and any of the maintainers: @YangYingliang , @成坚 (CHENG Jian) , @jiaoff , @zhengzengkai , @刘勇强 , @wangxiongfeng , @朱科潜 , @WangShaoBo , @lujialin , @wuxu_buque , @Xu Kuohai , @冷嘲啊 , @Lingmingqiang , @yuzenghui , @juntian , @OSSIM , @陈结松 , @whoisxxx , @koulihong , @刘恺 , @hanjun-guo , @woqidaideshi , @Chiqijun , @Kefeng , @ThunderTown , @AlexGuo , @kylin-mayukun , @Zheng Zucheng , @柳歆 , @Jackie Liu , @zhujianwei001 , @郑振鹏 , @SuperSix173 , @colyli , @Zhang Yi , @htforge , @Qiuuuuu , @Yuehaibing , @xiehaocheng , @guzitao , @CTC-Xibo.Wang , @zhanghongchen , @chen wei , @Jason Zeng , @苟浩 , @DuanqiangWen , @georgeguo , @毛泓博 , @AllenShi , @zhangjialin , @Xie XiuQi

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(2)
5329419 openeuler ci bot 1632792936
C
1
https://gitee.com/openeuler/kernel.git
git@gitee.com:openeuler/kernel.git
openeuler
kernel
kernel

搜索帮助