[tahoe-dev] Progress on SFTP for v1.7

David-Sarah Hopwood david-sarah at jacaranda.org
Fri May 21 08:33:19 PDT 2010


Francois Deppierraz wrote:
> On 05/13/2010 06:01 AM, David-Sarah Hopwood wrote:
> 
>> There are two implementations of an SFTP file handle: ShortReadOnlySFTPFile
>> and GeneralSFTPFile. The former is used for short immutable files opened
>> for reading. The latter is used in all other cases. The threshold for
>> "short" is currently "up to 1000 bytes", although it will be raised later
>> for efficiency.
>>
>> So, to test the code thoroughly, it's necessary to use files in all of
>> the following categories:
>>
>>   - LIT files (up to 65 bytes I think; immutable)
>>   - small CHK files (66 to 1000 bytes inclusive; immutable)
>>   - large CHK files (more than 1000 bytes; immutable)
>>   - SSK files (size doesn't matter; mutable)
> 
> Is it possible to *create* new SSK files through the SFTP interface?

No. There's no provision in the SFTP protocol to allow the client to
specify whether a new file should be mutable or immutable. (It wouldn't
be a good idea to always create mutable files, even as a configuration
option.)

> I was thinking of how little swap or lock file created by editors like 
> vim or OpenOffice were going to be handled by the SFTP frontend.

Very small files (less than ~65 bytes) that fit in a LIT URI will be
handled quite efficiently; they will only cause a directory modification.

> Vim, for instance, creates a swap file named '.something.swp' in the 
> current directory. This swap file records all the modifications made to 
> the original file to support undo operations. If, each time the swap 
> file gets written, a new immutable file is created, then we'll probably 
> get into trouble.

I'm not sure why this would cause any more problem than creating a new
immutable file for the contents.

-- 
David-Sarah Hopwood  ⚥  http://davidsarah.livejournal.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 292 bytes
Desc: OpenPGP digital signature
Url : http://allmydata.org/pipermail/tahoe-dev/attachments/20100521/ae00fbc3/attachment.pgp 


More information about the tahoe-dev mailing list