#define PTLRPC_SEC_FL_MDS 0x0001 /* outgoing from MDS */
#define PTLRPC_SEC_FL_REVERSE 0x0002 /* reverse sec */
#define PTLRPC_SEC_FL_PAG 0x0004 /* enable PAG */
+#define PTLRPC_SEC_FL_OSS 0x0008 /* outgoing to OSS XXX */
#define PTLRPC_CREDCACHE_NR 8
#define PTLRPC_CREDCACHE_MASK (PTLRPC_CREDCACHE_NR - 1)
RETURN(err);
}
- if (pag) {
+ /* FIXME Because of the async nature of file i/o, we never know
+ * who is actually dirty the pages; and any process have chance
+ * to trigger dirty-flushing within its own process context. So
+ * for simplicity we simply use root's credential, we suppose root
+ * always have credential.
+ */
+ if (pag)
sec_flags = PTLRPC_SEC_FL_PAG;
- err = obd_set_info(obd->obd_self_export,
- strlen("sec_flags"), "sec_flags",
- sizeof(sec_flags), &sec_flags);
- if (err) {
- OBD_FREE(data, sizeof(*data));
- RETURN(err);
- }
+ else
+ sec_flags = PTLRPC_SEC_FL_OSS;
+
+ err = obd_set_info(obd->obd_self_export,
+ strlen("sec_flags"), "sec_flags",
+ sizeof(sec_flags), &sec_flags);
+ if (err) {
+ OBD_FREE(data, sizeof(*data));
+ RETURN(err);
}
err = obd_connect(&dt_conn, obd, &sbi->ll_sb_uuid, data, 0);