On Fri, Oct 24, 2008 at 12:36:50AM -0400, Martin K. Petersen wrote: > agk> Perhaps change the register/unregister interface to make it > agk> symmetric: we always register and unregister when creating the > agk> device, then set the integrity to the appropriate value - which > agk> might include NULL - when the new table is put into place. > It seemed wasteful to register profiles since 99%+ of all storage > devices out there that don't have a need for them. That's why I > deferred the allocation. But I guess mere mortals compile without > BLK_DEV_INTEGRITY anyway so it may not matter that much... Then the integrity profile allocation/free should be attached to the table creation/destruction, not the device itself, and you make the reasonable assumption that the profiles of the devices in the table won't change between table creation and device resumption. i.e. Each dm table holds a reference to its own allocated integrity profile, and when a table switches from inactivate to live, that profile becomes the one registered against the block device (without memory allocation that could deadlock at that point - the allocation might involve flushing to the suspended device, which waits for the resume which waits for this allocation). (I'd prefer not to see another dependency on PF_MEMALLOC enter the tree, when a slightly different interface could avoid it and still offer lazy allocation.) Alasdair -- agk@xxxxxxxxxx -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel