User: Password:
Subscribe / Log in / New account

Block layer discard requests

Block layer discard requests

Posted Aug 18, 2008 22:57 UTC (Mon) by jlokier (guest, #52227)
In reply to: Block layer discard requests by seanyoung
Parent article: Block layer discard requests

They're not _filesystem_ barrier requests: a DISCARD doesn't cause dirty blocks/pages to be
flushed.  Rather, it's a barrier in the request queue, so any write submitted to the request
queue afterwards will not pass the DISCARD.

(Log in to post comments)

Block layer discard requests

Posted Aug 19, 2008 9:39 UTC (Tue) by seanyoung (subscriber, #28711) [Link]

You say writes submitted after the discard will not be merged before the barrier. 

So say we have 100 of files being deleted on a FAT filesystem. After each file deletion a
discard (i.e. BARRIER) is submitted. 

Now in stead of writing the FAT table changes once at the end, the FAT table changes must be
written 100 times.

Block layer discard requests

Posted Aug 19, 2008 16:47 UTC (Tue) by jlokier (guest, #52227) [Link]

Writes were never merged by the device request queue anyway.

Merging the FAT table writes happens at a higher level: in the FAT filesystem.  That's not
affected by these changes.  The FAT filesystem will submit a series of DISCARD requests for
each deleted file, interspersed with a smaller number of FAT write requests which merge
multiple changes.

Copyright © 2018, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds