linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* help with 'discard' mount option on eMMC
@ 2013-10-10  6:44 Prasanna NAVARATNA
  2013-10-10  8:53 ` Konstantin Dorfman
  0 siblings, 1 reply; 4+ messages in thread
From: Prasanna NAVARATNA @ 2013-10-10  6:44 UTC (permalink / raw)
  To: linux-mmc

Hello,

I'm using Hynix eMMC4.41 with Linux kernel 3.4.5.

After mounting ext4 partition /userdata with 'discard' mount option enabled,
fs triggers TRIM commands to eMMC after every file deletion. With this
setup, for a continuous reboot test (5s awake and issue reboot and repeat)
with 10 or 20 iterations, i see data corruption in eMMC consistently.

mount options are :- noatime,nosuid,nodev,noauto_da_alloc,discard
encryptable="path"

What am i missing here? if 'discard' mount option is removed, then no data
corruption in eMMC for more than 200 iterations. Does TRIM needs some extra
care? BKOPS is not enabled in eMMC (is bkops mandatory if using TRIM?)
Apologies, if this is not proper platform to ask such question. Please guide
and throw some light.

Thanks,
Prasanna NAVARATNA


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: help with 'discard' mount option on eMMC
  2013-10-10  6:44 help with 'discard' mount option on eMMC Prasanna NAVARATNA
@ 2013-10-10  8:53 ` Konstantin Dorfman
  2013-10-10  9:40   ` Prasanna NAVARATNA
  0 siblings, 1 reply; 4+ messages in thread
From: Konstantin Dorfman @ 2013-10-10  8:53 UTC (permalink / raw)
  To: Prasanna NAVARATNA; +Cc: linux-mmc

Hello,
Could you please post kernel log of such failure?
What hw are you using?

On 10/10/13 09:44, Prasanna NAVARATNA wrote:
> Hello,
>
> I'm using Hynix eMMC4.41 with Linux kernel 3.4.5.
>
> After mounting ext4 partition /userdata with 'discard' mount option enabled,
> fs triggers TRIM commands to eMMC after every file deletion. With this
> setup, for a continuous reboot test (5s awake and issue reboot and repeat)
> with 10 or 20 iterations, i see data corruption in eMMC consistently.
>
> mount options are :- noatime,nosuid,nodev,noauto_da_alloc,discard
> encryptable="path"
>
> What am i missing here? if 'discard' mount option is removed, then no data
> corruption in eMMC for more than 200 iterations. Does TRIM needs some extra
> care? BKOPS is not enabled in eMMC (is bkops mandatory if using TRIM?)
> Apologies, if this is not proper platform to ask such question. Please guide
> and throw some light.
>
> Thanks,
> Prasanna NAVARATNA
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: help with 'discard' mount option on eMMC
  2013-10-10  8:53 ` Konstantin Dorfman
@ 2013-10-10  9:40   ` Prasanna NAVARATNA
  2013-10-10 11:17     ` Konstantin Dorfman
  0 siblings, 1 reply; 4+ messages in thread
From: Prasanna NAVARATNA @ 2013-10-10  9:40 UTC (permalink / raw)
  To: linux-mmc


> Hello,
> Could you please post kernel log of such failure?
> What hw are you using?
I'm using sdhci controller. Hynix eMMC4.41. Linux Kernel 3.4.5
There are no kernel log failures as such.

If i add print while sending CMD38 when 'discard' mount option is specified,
then CMD38 with Arg 1 are continuously sent.
After 5 secs, when reboot command is issued, the partitions are remounted as
RO and CMD38 stops! 
After shutdown, while booting up, files are getting corrupted. I'm checking
log file in /data/system/uiderrors.txt :-
10/9/13 12:32 PM: Error reading settings:
org.xmlpull.v1.XmlPullParserException: name expected (position:START_TAG
<pa>@791:65540 in java.io.InputStreamReader@42150148)
If i check the file where read error happened, there is a big chunk of
ZERO's in the file.
I'm thinking, eMMC has erased, but ext4 meta data is not updated?? (or) 
Do we need to have BKOPS in eMMC and wait for BKOPS to complete before
shutting down? (Or) 
Is it necessary to provide clock for some more time during shutdown so as
eMMC completes internal operations with that clock?

I'm thinking what could be possibly going wrong or what extra needs to be
taken care of?




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: help with 'discard' mount option on eMMC
  2013-10-10  9:40   ` Prasanna NAVARATNA
@ 2013-10-10 11:17     ` Konstantin Dorfman
  0 siblings, 0 replies; 4+ messages in thread
From: Konstantin Dorfman @ 2013-10-10 11:17 UTC (permalink / raw)
  To: Prasanna NAVARATNA; +Cc: linux-mmc

Hello,

On 10/10/13 12:40, Prasanna NAVARATNA wrote:
>> Hello,
>> Could you please post kernel log of such failure?
>> What hw are you using?
> I'm using sdhci controller. Hynix eMMC4.41. Linux Kernel 3.4.5
> There are no kernel log failures as such.
I need it to understand the flow. Also - how exactly reboot done? Is it 
urgent reboot with no fs sync?

> Do we need to have BKOPS in eMMC and wait for BKOPS to complete before
> shutting down? (Or)
BKOPS itself when disabled impact on busy time for write commands.


-- 
sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-10-10 11:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-10  6:44 help with 'discard' mount option on eMMC Prasanna NAVARATNA
2013-10-10  8:53 ` Konstantin Dorfman
2013-10-10  9:40   ` Prasanna NAVARATNA
2013-10-10 11:17     ` Konstantin Dorfman

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).