obscure File_system::Out_of_node_handles exception

Replace the Out_of_node_handles exception with Out_of_metadata.
Clients need to know when the server is out of internal resources,
but not why.

Cleanup and sort the errors at file_system_session.h.
Remove 'Size_limit_reached exception' from File_system, which was
internal to ram_fs.

Issue #1751
Fixes #1909
This commit is contained in:
Emery Hemingway
2016-03-17 15:09:07 +01:00
committed by Christian Helmuth
parent 58632ab8b5
commit cb952d2087
14 changed files with 109 additions and 95 deletions

View File

@ -171,8 +171,10 @@ namespace File_system {
if (seek_offset == (seek_off_t)(~0))
seek_offset = _chunk.used_size();
if (seek_offset + len >= Chunk_level_0::SIZE)
throw Size_limit_reached();
if (seek_offset + len >= Chunk_level_0::SIZE) {
len = (Chunk_level_0::SIZE-1) - seek_offset;
PERR("%s: size limit %d reached", name(), Chunk_level_0::SIZE);
}
_chunk.write(src, len, (size_t)seek_offset);

View File

@ -700,7 +700,6 @@ class File_system::Session_component : public Session_rpc_object
_process_packet_op(packet, *node);
}
catch (Invalid_handle) { PERR("Invalid_handle"); }
catch (Size_limit_reached) { PERR("Size_limit_reached"); }
/*
* The 'acknowledge_packet' function cannot block because we