*
* You should have received a copy of the GNU General Public License
* version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * http://www.gnu.org/licenses/gpl-2.0.html
*
* GPL HEADER END
*/
dentry = osd_child_dentry_by_inode(env, parent->d_inode,
name, strlen(name));
mutex_lock(&parent->d_inode->i_mutex);
- rc = osd_ldiskfs_add_entry(info, oh->ot_handle, dentry,
+ rc = osd_ldiskfs_add_entry(info, osd, oh->ot_handle, dentry,
obj->oo_inode, NULL);
CDEBUG(D_INODE, "%s: add %s:%lu to remote parent %lu.\n", osd_name(osd),
name, obj->oo_inode->i_ino, parent->d_inode->i_ino);
/* Check lma to see whether it is remote object */
rc = osd_get_lma(oti, obj->oo_inode, &oti->oti_obj_dentry, lma);
- if (rc != 0)
+ if (rc != 0) {
+ /* No LMA if the directory is created before 2.0 */
+ if (rc == -ENODATA)
+ rc = 0;
RETURN(rc);
+ }
if (likely(!(lma->lma_incompat & LMAI_REMOTE_PARENT)))
RETURN(0);
ll_vfs_dq_init(dir->d_inode);
mutex_lock(&dir->d_inode->i_mutex);
- rc = osd_ldiskfs_add_entry(info, th, child, inode, NULL);
+ rc = osd_ldiskfs_add_entry(info, osd, th, child, inode, NULL);
mutex_unlock(&dir->d_inode->i_mutex);
RETURN(rc);
}
/**
- * Use LPU64 for legacy OST sequences, but use LPX64i for new
+ * Use %llu for legacy OST sequences, but use %llx for new
* sequences names, so that the O/{seq}/dN/{oid} more closely
* follows the DFID/PFID format. This makes it easier to map from
* debug messages to objects in the future, and the legacy space
{
snprintf(seq_name, name_size,
(fid_seq_is_rsvd(seq) ||
- fid_seq_is_mdt0(seq)) ? LPU64 : LPX64i,
+ fid_seq_is_mdt0(seq)) ? "%llu" : "%llx",
fid_seq_is_idif(seq) ? 0 : seq);
}
snprintf(name, name_size,
(fid_seq_is_rsvd(fid_seq(fid)) ||
fid_seq_is_mdt0(fid_seq(fid)) ||
- fid_seq_is_idif(fid_seq(fid))) ? LPU64 : LPX64i, id);
+ fid_seq_is_idif(fid_seq(fid))) ? "%llu" : "%llx", id);
}
/* external locking is required */
if (rc != 0)
GOTO(unlock, rc);
- rc = osd_ldiskfs_add_entry(info, jh, tgt_child, inode, NULL);
+ rc = osd_ldiskfs_add_entry(info, osd, jh, tgt_child, inode, NULL);
GOTO(unlock, rc);