int rc;
ENTRY;
- if (ss == NULL)
- RETURN(1);
+ LASSERT(ss != NULL);
+ LASSERT(ss->ss_server_fld != NULL);
rc = osd_fld_lookup(env, osd, seq, range);
if (rc != 0) {
static int osd_remote_fid(const struct lu_env *env, struct osd_device *osd,
struct lu_fid *fid)
{
+ struct seq_server_site *ss = osd_seq_site(osd);
ENTRY;
/* FID seqs not in FLDB, must be local seq */
if (unlikely(!fid_seq_in_fldb(fid_seq(fid))))
RETURN(0);
+ /* If FLD is not being initialized yet, it only happens during the
+ * initialization, likely during mgs initialization, and we assume
+ * this is local FID. */
+ if (ss == NULL || ss->ss_server_fld == NULL)
+ RETURN(0);
+
+ /* Only check the local FLDB here */
if (osd_seq_exists(env, osd, fid_seq(fid)))
RETURN(0);
int rc;
ENTRY;
- if (ss == NULL)
- RETURN(1);
+ LASSERT(ss != NULL);
+ LASSERT(ss->ss_server_fld != NULL);
rc = osd_fld_lookup(env, osd, seq, range);
if (rc != 0) {
static int osd_remote_fid(const struct lu_env *env, struct osd_device *osd,
struct lu_fid *fid)
{
+ struct seq_server_site *ss = osd_seq_site(osd);
ENTRY;
/* FID seqs not in FLDB, must be local seq */
if (unlikely(!fid_seq_in_fldb(fid_seq(fid))))
RETURN(0);
+ /* If FLD is not being initialized yet, it only happens during the
+ * initialization, likely during mgs initialization, and we assume
+ * this is local FID. */
+ if (ss == NULL || ss->ss_server_fld == NULL)
+ RETURN(0);
+
+ /* Only check the local FLDB here */
if (osd_seq_exists(env, osd, fid_seq(fid)))
RETURN(0);