LPU64" files, "LPU64" free files\n", d->opd_obd->obd_name,
sfs->os_blocks, sfs->os_bfree, sfs->os_bavail,
sfs->os_files, sfs->os_ffree);
- RETURN(0);
+
+ /* ENOSPC could be for two reasons,
+ * 1) not enough inodes 2) not enough blocks
+ * for 1) lod should use preallocated objects
+ * and for 2) shouldn`t. So, here for ENOSPC
+ * different values is returned to spend preallocated.
+ */
+ if (d->opd_pre_status == -ENOSPC && sfs->os_ffree < 32)
+ RETURN(0);
+
+ RETURN(d->opd_pre_status);
}
static int osp_sync_timeout(void *data)
* \retval 0 0 if initialization succeeds.
* \retval negative negative errno if initialization failed.
*/
-static int __init osp_mod_init(void)
+static int __init osp_init(void)
{
struct obd_type *type;
int rc;
* This callback is called when kernel unloads OSP module from memory, and
* it will deregister OSP and LWP device type from obd_types (\see class_obd.c).
*/
-static void __exit osp_mod_exit(void)
+static void __exit osp_exit(void)
{
class_unregister_type(LUSTRE_LWP_NAME);
class_unregister_type(LUSTRE_OSP_NAME);
}
MODULE_AUTHOR("OpenSFS, Inc. <http://www.lustre.org/>");
-MODULE_DESCRIPTION("Lustre OST Proxy Device ("LUSTRE_OSP_NAME")");
+MODULE_DESCRIPTION("Lustre OSD Storage Proxy ("LUSTRE_OSP_NAME")");
MODULE_VERSION(LUSTRE_VERSION_STRING);
MODULE_LICENSE("GPL");
-module_init(osp_mod_init);
-module_exit(osp_mod_exit);
+module_init(osp_init);
+module_exit(osp_exit);