#include <linux/pagemap.h>
#include <linux/quotaops.h>
#include <linux/version.h>
-#include <linux/kp30.h>
+#include <libcfs/kp30.h>
#include <linux/lustre_fsfilt.h>
#include <linux/obd.h>
#include <linux/obd_class.h>
struct reint_record *r_rec)
{
struct fsfilt_operations *fsfilt = S2SMI(sb)->sm_fsfilt;
- char *path = r_rec->rec_data1;
+ char *path = r_rec->name.path_name;
int type = r_rec->u_rec.ur_iattr.ia_mode & S_IFMT;
struct nameidata nd;
struct dentry *dparent = NULL;
struct reint_record *r_rec)
{
struct fsfilt_operations *fsfilt = S2SMI(sb)->sm_fsfilt;
- char *new_path = r_rec->rec_data2;
+ char *new_path = r_rec->u.re_name.path_name;
struct nameidata nd;
struct dentry *dparent = NULL;
struct dentry *dentry = NULL;
CERROR("Error for undo node %s\n", new_path);
GOTO(cleanup, 0);
} else {
- /*restore time attr of dir inode*/
struct iattr *iattr = &r_rec->u_rec.ur_pattr;
iattr->ia_valid = ATTR_MTIME | ATTR_CTIME;
struct reint_record *r_rec)
{
struct fsfilt_operations *fsfilt = S2SMI(sb)->sm_fsfilt;
- char *path = r_rec->rec_data1;
+ char *path = r_rec->name.path_name;
struct nameidata nd;
struct dentry *dparent;
struct dentry *dentry = NULL;
if (!SMFS_DO_WRITE_KML(r_rec->u_rec.ur_flags))
SMFS_CLEAN_INODE_REC(dir);
if (SMFS_DO_DEC_LINK(r_rec->u_rec.ur_flags)) {
- ino_t ino = *((ino_t *)r_rec->rec_data2);
+ ino_t ino = *((ino_t *)r_rec->u.re_name.path_name);
struct inode* inode = iget(dir->i_sb, ino);
if (!inode)
GOTO(cleanup1, rc = -EINVAL);
post_smfs_dentry(del_dentry);
iput(inode);
} else {
- char *del_path = r_rec->rec_data2;
+ char *del_path = r_rec->u.re_name.path_name;
rc = lookup_by_path(del_path, LOOKUP_PARENT, &del_nd);
if (rc)
l_dput(del_dentry);
path_release(&del_nd);
}
+
if (!rc) {
- /*restore time attr of dir inode*/
struct iattr *iattr = &r_rec->u_rec.ur_pattr;
iattr->ia_valid = ATTR_MTIME | ATTR_CTIME;
struct reint_record *r_rec)
{
struct fsfilt_operations *fsfilt = S2SMI(sb)->sm_fsfilt;
- char *path = r_rec->rec_data1;
- char *new_path = r_rec->rec_data2;
+ char *path = r_rec->name.path_name;
+ char *new_path = r_rec->u.re_name.path_name;
struct nameidata nd;
struct nameidata new_nd;
struct dentry *dparent;
CERROR("Error for undo node %s\n", new_path);
GOTO(cleanup, 0);
} else {
- /*restore time attr of dir inode*/
struct iattr *iattr = &r_rec->u_rec.ur_pattr;
iattr->ia_valid = ATTR_MTIME | ATTR_CTIME;
struct reint_record *r_rec)
{
struct fsfilt_operations *fsfilt = S2SMI(sb)->sm_fsfilt;
- char *path = r_rec->rec_data1;
+ char *path = r_rec->name.path_name;
struct nameidata nd;
struct dentry *dparent = NULL;
struct dentry *dentry = NULL;
if (IS_ERR(handle))
GOTO(cleanup, rc = PTR_ERR(handle));
- /*FIXME later, did not set parent attr*/
+ /* FIXME later, did not set parent attr. */
r_rec->u_rec.ur_iattr.ia_valid = r_rec->u_rec.ur_pattr.ia_valid;
rc = fsfilt->fs_setattr(dentry, handle, &r_rec->u_rec.ur_iattr, 0);
cleanup: