Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5234f225 authored by Oleg Drokin's avatar Oleg Drokin Committed by Greg Kroah-Hartman
Browse files

staging/lustre: Remove unused osc_on_mdt function



This only makes sense on metadata server, so get rid of it.

Also remove now unused MDS_OSC_MAX_RIF_DEFAULT define

Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fa4d7a36
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -216,7 +216,6 @@ struct timeout_item {
};

#define OSC_MAX_RIF_DEFAULT       8
#define MDS_OSC_MAX_RIF_DEFAULT   50
#define OSC_MAX_RIF_MAX	 256
#define OSC_MAX_DIRTY_DEFAULT  (OSC_MAX_RIF_DEFAULT * 4)
#define OSC_MAX_DIRTY_MB_MAX   2048     /* arbitrary, but < MAX_LONG bytes */
+1 −27
Original line number Diff line number Diff line
@@ -227,29 +227,6 @@ void client_destroy_import(struct obd_import *imp)
}
EXPORT_SYMBOL(client_destroy_import);

/**
 * Check whether or not the OSC is on MDT.
 * In the config log,
 * osc on MDT
 *	setup 0:{fsname}-OSTxxxx-osc[-MDTxxxx] 1:lustre-OST0000_UUID 2:NID
 * osc on client
 *	setup 0:{fsname}-OSTxxxx-osc 1:lustre-OST0000_UUID 2:NID
 *
 **/
static int osc_on_mdt(char *obdname)
{
	char *ptr;

	ptr = strrchr(obdname, '-');
	if (ptr == NULL)
		return 0;

	if (strncmp(ptr + 1, "MDT", 3) == 0)
		return 1;

	return 0;
}

/* Configure an RPC client OBD device.
 *
 * lcfg parameters:
@@ -400,9 +377,6 @@ int client_obd_setup(struct obd_device *obddev, struct lustre_cfg *lcfg)
	} else if (totalram_pages >> (20 - PAGE_CACHE_SHIFT) <= 512 /* MB */) {
		cli->cl_max_rpcs_in_flight = 4;
	} else {
		if (osc_on_mdt(obddev->obd_name))
			cli->cl_max_rpcs_in_flight = MDS_OSC_MAX_RIF_DEFAULT;
		else
		cli->cl_max_rpcs_in_flight = OSC_MAX_RIF_DEFAULT;
	}
	rc = ldlm_get_ref();