summaryrefslogtreecommitdiffstats
path: root/drivers/block
Commit message (Collapse)AuthorAgeFilesLines
* drbd: Temporarily change the return type of all worker callbacksAndreas Gruenbacher2012-11-086-58/+56Star
| | | | | | | | This helps to ensure that we don't miss one of them when changing their return value semantics. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: drbd_send_short_cmd(): Return 0 upon success and an error code otherwiseAndreas Gruenbacher2012-11-082-2/+2
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: drbd_send_dblock(): Return 0 upon success and an error code otherwiseAndreas Gruenbacher2012-11-082-12/+13
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: _drbd_send_bio(), _drbd_send_zc_bio(): Return 0 upon success and an ↵Andreas Gruenbacher2012-11-081-12/+18
| | | | | | | error code otherwise Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: drbd_send_block(): Return 0 upon success and an error code otherwiseAndreas Gruenbacher2012-11-082-14/+15
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: _drbd_send_zc_ee(): Return 0 upon success and an error code otherwiseAndreas Gruenbacher2012-11-081-5/+8
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: _drbd_send_page(): Return 0 upon success and an error code otherwiseAndreas Gruenbacher2012-11-081-21/+23
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: _drbd_no_send_page(): Return 0 upon success and an error code otherwiseAndreas Gruenbacher2012-11-081-9/+15
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: drbd_send_oos(): Return 0 upon success and an error code otherwiseAndreas Gruenbacher2012-11-082-2/+2
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: drbd_send_drequest_csum(): Return 0 upon success and an error code ↵Andreas Gruenbacher2012-11-082-13/+11Star
| | | | | | | otherwise Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: drbd_send_drequest(): Return 0 upon success and an error code otherwiseAndreas Gruenbacher2012-11-082-6/+4Star
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: drbd_send_ov_request(): Return 0 upon success and an error code otherwiseAndreas Gruenbacher2012-11-082-4/+2Star
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: drbd_send_ack_ex(): Return 0 upon success and an error code otherwiseAndreas Gruenbacher2012-11-082-6/+6
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: drbd_send_ack_{dp,rp}(): Return void: the result is never usedAndreas Gruenbacher2012-11-082-11/+11
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: drbd_send_ack(): Return 0 upon success and an error code otherwiseAndreas Gruenbacher2012-11-083-14/+14
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: _drbd_send_ack(): Return 0 upon success and an error code otherwiseAndreas Gruenbacher2012-11-081-15/+13Star
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: drbd_send_b_ack(): Return void: the result is never usedAndreas Gruenbacher2012-11-082-9/+5Star
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: drbd_send_sr_reply(): Return void: the result is never usedAndreas Gruenbacher2012-11-082-3/+3
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: drbd_send_state_req(): Return 0 upon success and an error code otherwiseAndreas Gruenbacher2012-11-082-2/+2
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: conn_send_state_req(): Return 0 upon success and an error code otherwiseAndreas Gruenbacher2012-11-082-2/+2
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: _conn_send_state_req(): Return 0 upon success and an error code otherwiseAndreas Gruenbacher2012-11-082-3/+3
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: drbd_send_sizes(): Return 0 upon success and an error code otherwiseAndreas Gruenbacher2012-11-082-4/+2Star
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: drbd_gen_and_send_sync_uuid(): Return void: the result is never usedAndreas Gruenbacher2012-11-082-3/+3
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: drbd_send_uuids() and its variants: Return 0 upon success and an error ↵Andreas Gruenbacher2012-11-082-3/+3
| | | | | | | code otherwise Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: drbd_send_protocol(): Return 0 upon success and an error code otherwiseAndreas Gruenbacher2012-11-082-6/+6
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: drbd_send_handshake(): Return 0 upon success and an error code otherwiseAndreas Gruenbacher2012-11-081-8/+8
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: drbd_send_state(): Return 0 upon success and an error code otherwiseAndreas Gruenbacher2012-11-083-6/+6
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: drbd_send_sync_param(): Return 0 upon success and an error code otherwiseAndreas Gruenbacher2012-11-082-5/+5
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: drbd_send_cmd(): Return 0 upon success and an error code otherwiseAndreas Gruenbacher2012-11-082-11/+11
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: Get rid of USE_DATA_SOCKET and USE_META_SOCKETAndreas Gruenbacher2012-11-082-38/+22Star
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: conn_send_cmd(): Return 0 upon success and an error code otherwiseAndreas Gruenbacher2012-11-082-8/+8
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: _drbd_send_cmd(): Return 0 upon success and an error code otherwiseAndreas Gruenbacher2012-11-083-11/+10Star
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: _conn_send_cmd(): Return 0 upon success and an error code otherwiseAndreas Gruenbacher2012-11-083-14/+11Star
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: conn_send_cmd2(): Return 0 upon success and an error code otherwiseAndreas Gruenbacher2012-11-082-16/+12Star
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: Add drbd_send_all(): Send an entire bufferAndreas Gruenbacher2012-11-082-0/+21
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: drbd_get_data_sock(): Return 0 upon success and an error code otherwiseAndreas Gruenbacher2012-11-083-18/+9Star
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: drbd_send(): Return a "real" error code if we have no socketAndreas Gruenbacher2012-11-081-1/+1
| | | | | | | | Q: Can this case even trigger? Is failing this way any better than one that causes a NULL pointer access? Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: Fixed conn_lowest_minorPhilipp Reisner2012-11-083-11/+13
| | | | | | | | It actually returned the lowest volume number. While doing that renamed a few wrongly named variables. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: distribute former syncer_conf settings to disk, connection, and ↵Lars Ellenberg2012-11-086-288/+449
| | | | | | | | | | | | | | | | | | | | | | | | resource level This commit breaks the API again. Move per-volume former syncer options into disk_conf. Move per-connection former syncer options into net_conf. Renamed the remainign sync_conf to res_opts Syncer settings have been changeable at runtime, so we need to prepare for these settings to be runtime-changeable in their new home as well. Introduce new configuration operations, and share the netlink attribute between "attach" (create new disk) and "disk-opts" (change options). Same for "connect" and "net-opts". Some fields cannot be changed at runtime, however. Introduce a new flag GENLA_F_INVARIANT to be able to trigger on that in the generated validation and assignment functions. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: conn_khelper() for user mode callbacks for connectionsPhilipp Reisner2012-11-041-25/+72
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: Allow volumes to become primary only on one sidePhilipp Reisner2012-11-042-3/+19
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: fix conn_reconfig_start without conn_reconfig_done in drbd_adm_attachLars Ellenberg2012-11-041-2/+3
| | | | | | | | If drbd_adm_attach failed early, it left the CONFIG_PENDING bit on, blocking any further conn_reconfig_start on that connection. Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: Separate connection state changes from minor dev state changes #2Philipp Reisner2012-11-041-21/+26
| | | | | | | New function got_conn_RqSReply() Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: Converted got_Ping() and got_PingAck() from mdev to tconnPhilipp Reisner2012-11-041-6/+5Star
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: Allow packet handler functions that take a connection (meta connection)Philipp Reisner2012-11-041-25/+41
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: Separate connection state changes from minor dev state changes #1Philipp Reisner2012-11-041-8/+28
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: Converted receive_protocol() from mdev to tconnPhilipp Reisner2012-11-041-23/+23
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: Allow packet handler functions that take a connectionPhilipp Reisner2012-11-041-33/+42
| | | | | | | That is necessary in case a connection does not have a volume 0 Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: Moved CONN_DRY_RUN to the per connection (tconn) flagsPhilipp Reisner2012-11-042-5/+5
| | | | | Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
* drbd: Do not modify the connection state with something else that ↵Philipp Reisner2012-11-043-17/+11Star
| | | | | | | conn_request_state() Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com> Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>