Steve, This patch builds ontop of the previous patch that fixed the issue with rmdir and encryption. The root cause is the same thing. When encryption is used we can not append the padding a small 7 byte or less iov since the encryption code does not like such small buffers, (unless it is the very last buffer?) If you have not posted the previous rmdir() bug upstream yet, you can merge that patch and this together since part of this patch just undoes what that patch did and instead replaces it with a generic handler for padding + encryption. What we do now is that IF we need to add padding, but we are not using encryption, then we just add a small iov with padding bytes. This is cheap. IF we need to add padding but encryption is in use, then we just flatten the whole request and use memcpy() to create one single buffer containg all the data plus the padding bytes. (bleh :-( ) An alternative way would be to change the encryption code so that we CAN pass iovectors like such : 16 bytes + 4 bytes + 4 bytes + 16 bytes and have it do whatever reassembly it needs with the small iovs. We will surely not be the first that would find it convenient to be able to add a train of arbitrarily small iovs and have it just work? But, that code is way beyond my intention right now.