linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Asai Thambi SP <asamymuthupa@micron.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: <linux-kernel@vger.kernel.org>,
	Sam Bradshaw <sbradshaw@micron.com>,
	Selvan Mani <smani@micron.com>,
	Rajesh Kumar Sambandam <rsambandam@micron.com>,
	Vignesh Gunasekaran <vgunasekaran@micron.com>
Subject: Re: [PATCH 01/10] mtip32xx: Abort secure erase when drive is mounted
Date: Tue, 23 Feb 2016 18:08:25 -0800	[thread overview]
Message-ID: <1d4ce067-9116-c2b1-f1d8-27c4f862cc5c@micron.com> (raw)
In-Reply-To: <20160223161104.GA13712@kernel.dk>

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.

  reply	other threads:[~2016-02-24  2:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-23  4:59 [PATCH 01/10] mtip32xx: Abort secure erase when drive is mounted Asai Thambi SP
2016-02-23 16:11 ` Jens Axboe
2016-02-24  2:08   ` Asai Thambi SP [this message]
2016-02-24  2:14     ` Jens Axboe
2016-02-24  2:38       ` Asai Thambi SP

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1d4ce067-9116-c2b1-f1d8-27c4f862cc5c@micron.com \
    --to=asamymuthupa@micron.com \
    --cc=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rsambandam@micron.com \
    --cc=sbradshaw@micron.com \
    --cc=smani@micron.com \
    --cc=vgunasekaran@micron.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).