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

From: Jens Axboe
Date: Tue Feb 23 2016 - 11:11:14 EST


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?

--
Jens Axboe