IETF-SSH archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: SFTP : Byte-range locks



Nickolay L. wrote:
Hello,

  In 10th version of draft-ietf-secsh-filexfer written :

  uLockMask
      A bit mask of SSH_FXF_ACCESS_BLOCK_* values; the meanings are
      described in Section 8.1.1.3.

  What means for server SSH_FXF_ACCESS_BLOCK_READ &
  SSH_FXF_ACCESS_BLOCK_WRITE, is clear. But what means two other
  flags, SSH_FXF_ACCESS_BLOCK_DELETE & SSH_FXF_ACCESS_BLOCK_ADVISORY?

8.1.1.3 seems pretty clear on this.

If BLOCK_DELETE is specified, the file cannot be deleted.
This doesn't make much sense in a byte-range lock... I
suppose it needs a bit of text there.

If ADVISORY is specified, the server doesn't enforce the
locks.  In the context of byte-range locks, this means that
the server will not grant a second, overlapping byte-range
lock, but it will not stop other callers from reading / writing
the locked range.

If ADVISORY is not set, the server will do MANDATORY locking;
not only will it not grant a second, overlapping byte-range
lock, but it will also not allow any conflicting IO operation
to proceed.

Which kind of locking is supported by the server is reflected
in the "supported2" extension sent by the server during protocol
startup.

I'll try to clarify the locking here as it applies to byte
range locks.

Thanks,

Joseph



Home | Main Index | Thread Index | Old Index