mirror of https://github.com/ceph/go-ceph
rbd: add doc comments for ReadAt and WriteAt
Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
parent
223f1e01d7
commit
51e9a080bb
|
@ -819,6 +819,7 @@ func (image *Image) Discard(ofs uint64, length uint64) (int, error) {
|
||||||
return int(ret), nil
|
return int(ret), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ReadAt copies data from the image into the supplied buffer.
|
||||||
func (image *Image) ReadAt(data []byte, off int64) (int, error) {
|
func (image *Image) ReadAt(data []byte, off int64) (int, error) {
|
||||||
if err := image.validate(imageIsOpen); err != nil {
|
if err := image.validate(imageIsOpen); err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
|
@ -845,6 +846,7 @@ func (image *Image) ReadAt(data []byte, off int64) (int, error) {
|
||||||
return ret, nil
|
return ret, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WriteAt copies data from the supplied buffer to the image.
|
||||||
func (image *Image) WriteAt(data []byte, off int64) (n int, err error) {
|
func (image *Image) WriteAt(data []byte, off int64) (n int, err error) {
|
||||||
if err := image.validate(imageIsOpen); err != nil {
|
if err := image.validate(imageIsOpen); err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
|
|
Loading…
Reference in New Issue