public inbox for linux-ide@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Rabbitson <rabbit+list@rabbit.us>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-ide@vger.kernel.org
Subject: Re: Kernel option to disable TRIM/discard system-wide?
Date: Sun, 29 May 2016 18:25:15 +0200	[thread overview]
Message-ID: <574B17EB.50108@rabbit.us> (raw)
In-Reply-To: <yq1oa7syzyy.fsf@sermon.lab.mkp.net>

On 05/27/2016 04:52 AM, Martin K. Petersen wrote:
>>>>>> "Peter" == Peter Rabbitson <rabbit+list@rabbit.us> writes:
>
>>> I want to disable trim on my system for good - yet there seems to be
>>> no kernel boot parameter for this.
>
> There's no global way to disable TRIM but you can disable it on a
> per-device basis by setting /sys/block/sdN/queue/discard_max_bytes to
> 0.

That would be sufficient for me - I can enforce this with a udev rule.

However what you propose does not currently work:

root@Ahasver:~# cat /sys/block/sda/queue/discard_max_bytes
2147450880

root@Ahasver:~# echo 0 > /sys/block/sda/queue/discard_max_bytes
-bash: /sys/block/sda/queue/discard_max_bytes: Permission denied

root@Ahasver:~# uname -a
Linux Ahasver 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u4 
(2016-02-29) x86_64 GNU/Linux

root@Ahasver:~# dpkg -l linux-image-3.16.0-4-amd64 | grep ii
ii  linux-image-3.16.0-4-amd64 3.16.7-ckt20-1+deb8u4 amd64        Linux 
3.16 for 64-bit PCs

What am I missing?

  reply	other threads:[~2016-05-29 16:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-23 21:01 Kernel option to disable TRIM/discard system-wide? Peter Rabbitson
2016-05-25 13:02 ` Peter Rabbitson
2016-05-26 20:46   ` Jeff Moyer
2016-05-27  2:52   ` Martin K. Petersen
2016-05-29 16:25     ` Peter Rabbitson [this message]
2016-06-01  3:05       ` Martin K. Petersen

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=574B17EB.50108@rabbit.us \
    --to=rabbit+list@rabbit.us \
    --cc=linux-ide@vger.kernel.org \
    --cc=martin.petersen@oracle.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