On Wed, May 05, 2010 at 09:19:53AM -0400, James Bottomley wrote: > Unfortunately, not. A long time ago we used to use SPECIAL for prepared > commands, but we stripped that path out. If you look at the prep > functions today, they only accept either REQ_TYPE_FS or > REQ_TYPE_BLOCK_PC ... they kill everything else, so we'd have to do > surgery on all the input paths to get this to work. > > Looking at all of this, I'm really unhappy with the way barriers are > working in SCSI ... using BLOCK_PC for them was a big mistake, since > block can't handle the errors and BLOCK_PC by its very nature requests > that all errors, however trivially fixable, be returned. > > It looks like we have precisely the same problems with discard too, > except there at least we'll ignore the error. > > Someone needs to take a good look at fixing this ... or at least just > making discard and barrier use the same submit paths, so we can fix it > up in the lower layers. Both barriers and dicards are FS requests as far as the block layer is concerned. We turn them into BLOCK_PC requests very late in the game, either in the prepare_flush function for barriers, or directly inside prep_fn for discard. I tried to handle discard requests as FS all the way through, but the various different ways in which we account for a request length didn't play nicely with that. Handling cache flushes as FS requests all the way through should be easier than that. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html