]> git.baikalelectronics.ru Git - kernel.git/commit
libceph: allow requests to return immediately on full conditions if caller wishes
authorJeff Layton <jlayton@redhat.com>
Tue, 4 Apr 2017 12:39:37 +0000 (08:39 -0400)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 4 May 2017 07:19:21 +0000 (09:19 +0200)
commitb4a9e2ff71204078e88d09ce271a80169a39e3e8
treef3c40a321710de3277ca3b99cda473b1e8c64f80
parenta18734532602285b72d0829558c15ac43cf9f583
libceph: allow requests to return immediately on full conditions if caller wishes

Usually, when the osd map is flagged as full or the pool is at quota,
write requests just hang. This is not what we want for cephfs, where
it would be better to simply report -ENOSPC back to userland instead
of stalling.

If the caller knows that it will want an immediate error return instead
of blocking on a full or at-quota error condition then allow it to set a
flag to request that behavior.

Set that flag in ceph_osdc_new_request (since ceph.ko is the only caller),
and on any other write request from ceph.ko.

A later patch will deal with requests that were submitted before the new
map showing the full condition came in.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/addr.c
fs/ceph/file.c
include/linux/ceph/osd_client.h
net/ceph/osd_client.c