Linux SCSI subsystem development
 help / color / mirror / Atom feed
* SYNCHRONIZE_CACHE from sd_preppare_flush does not have retries.!
@ 2010-04-19 11:32 Desai, Kashyap
  2010-04-19 16:20 ` Mike Christie
  0 siblings, 1 reply; 11+ messages in thread
From: Desai, Kashyap @ 2010-04-19 11:32 UTC (permalink / raw)
  To: linux-scsi@vger.kernel.org; +Cc: James.Bottomley@HansenPartnership.com

I am facing one issue with scsi stack.
Here is a background of my test.

Mount ext3 file system with journaling support with barrier=1, commit=5
Now, with this setup file system will do submit_bh with  WRITE_BARRIER flag set for interval of 5 seconds. (This is a part of journaling.)
Eventually it will call queue_flush() which will generate SCSI command of CDB: SYNCHRONIZE_CAHCE and insert it into the request queue.
I observed that creation of SYNCHRONIZE_CACHE is a part of sd_prepare_flush(). Here we have timeout set to SD_TIMEOUT but retries are not set.
Because of retries of the request is not set, there is no retries allowed for SYNCHRONIZE_CACHE at mid layer.

Because of zero retries for SYNCHRONIZE_CACHE command at mid-layer, it is creating trouble for file system.
In current situation, Even though LLD send back commands with DID_RESET, SYNCHRONIZE_CACHE will fail immediately without going for any retries, when HBA is in recovery state. Eventually this information goes to File system and it sees SYNCHRONIZE_CAHCE is failed and file system goes to Read only mode.

My question is "Can we add in sd_prepare_flush(), rq->retries = X" some reasonable retries value ?

Thanks,
Kashyap



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

end of thread, other threads:[~2010-04-30 17:21 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-19 11:32 SYNCHRONIZE_CACHE from sd_preppare_flush does not have retries.! Desai, Kashyap
2010-04-19 16:20 ` Mike Christie
2010-04-19 18:14   ` Bernd Schubert
2010-04-19 18:45     ` James Bottomley
2010-04-19 19:17       ` Bernd Schubert
2010-04-20  5:05         ` Desai, Kashyap
2010-04-20 14:54           ` [PATCH] " Bernd Schubert
2010-04-20 19:32             ` Mike Christie
2010-04-20 20:38               ` Bernd Schubert
2010-04-22 16:23                 ` James Bottomley
2010-04-29 20:13       ` Ric Wheeler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox