Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1341246

Re: [PATCH 01/10] mtip32xx: Abort secure erase when drive is mounted

From Jens Axboe <axboe@kernel.dk>
Newsgroups linux.kernel
Subject Re: [PATCH 01/10] mtip32xx: Abort secure erase when drive is mounted
Date 2016-02-24 03:20 +0100
Message-ID <r5xdw-68Q-15@gated-at.bofh.it> (permalink)
References <r5deO-8N-3@gated-at.bofh.it> <r5nQS-7QI-3@gated-at.bofh.it> <r5x3Q-656-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 02/23/2016 07:08 PM, Asai Thambi SP wrote:
> On 2/23/2016 8:11 AM, Jens Axboe wrote:
>> On Mon, Feb 22 2016, Asai Thambi SP wrote:
>>>
>>> To avoid erasing a device with a mounted filesystem, try to get exclusive
>>> access to the blkdev object corresponding to the device.
>>
>> I don't think this needs to be in the kernel, why not just check from
>> the official format tool if the device is mounted or not?
>>
>
> The official format tool checks if the device has a mounted filesystem before starting an erase operation. But with the driver being in kernel, some customers use hdparm to manage the device. This patch prevents possible accidental erase through open source tools.

We generally don't put that kind of policy in the kernel. I can firmware 
update a drive that is mounted, if I want to shoot myself in the foot, 
if I want to. The answer is, don't do it...


-- 
Jens Axboe

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 01/10] mtip32xx: Abort secure erase when drive is mounted Asai Thambi SP <asamymuthupa@micron.com> - 2016-02-23 06:00 +0100
  Re: [PATCH 01/10] mtip32xx: Abort secure erase when drive is mounted Jens Axboe <axboe@kernel.dk> - 2016-02-23 17:20 +0100
    Re: [PATCH 01/10] mtip32xx: Abort secure erase when drive is mounted Asai Thambi SP <asamymuthupa@micron.com> - 2016-02-24 03:10 +0100
      Re: [PATCH 01/10] mtip32xx: Abort secure erase when drive is mounted Jens Axboe <axboe@kernel.dk> - 2016-02-24 03:20 +0100
        Re: [PATCH 01/10] mtip32xx: Abort secure erase when drive is mounted Asai Thambi SP <asamymuthupa@micron.com> - 2016-02-24 03:40 +0100

csiph-web