Whamcloud - gitweb
- added delete_inode() which calls obd_fid_delete()
authoryury <yury>
Thu, 4 May 2006 17:17:04 +0000 (17:17 +0000)
committeryury <yury>
Thu, 4 May 2006 17:17:04 +0000 (17:17 +0000)
lustre/llite/llite_internal.h
lustre/llite/llite_lib.c
lustre/llite/super.c
lustre/llite/super25.c

index d25020d..0e1e113 100644 (file)
@@ -419,6 +419,7 @@ int ll_statfs_internal(struct super_block *sb, struct obd_statfs *osfs,
                        unsigned long maxage);
 void ll_update_inode(struct inode *inode, struct lustre_md *md);
 void ll_read_inode2(struct inode *inode, void *opaque);
+void ll_delete_inode(struct inode *inode);
 int ll_iocontrol(struct inode *inode, struct file *file,
                  unsigned int cmd, unsigned long arg);
 void ll_umount_begin(struct super_block *sb);
index 315f01b..ca20686 100644 (file)
@@ -1365,6 +1365,20 @@ void ll_read_inode2(struct inode *inode, void *opaque)
         }
 }
 
+void ll_delete_inode(struct inode *inode)
+{
+        struct ll_sb_info *sbi = ll_i2sbi(inode);
+        int rc;
+        ENTRY;
+
+        rc = obd_fid_delete(sbi->ll_md_exp, ll_inode2fid(inode));
+        if (rc) {
+                CERROR("fid_delete() failed, rc %d\n", rc);
+        }
+        
+        EXIT;
+}
+
 int ll_iocontrol(struct inode *inode, struct file *file,
                  unsigned int cmd, unsigned long arg)
 {
index 49c45d0..cd1b232 100644 (file)
@@ -47,6 +47,7 @@ struct super_operations lustre_super_operations =
 {
         .read_inode2    = ll_read_inode2,
         .clear_inode    = ll_clear_inode,
+        .delete_inode   = ll_delete_inode,
         .put_super      = ll_put_super,
         .statfs         = ll_statfs,
         .umount_begin   = ll_umount_begin,
index 28ff10c..f927774 100644 (file)
@@ -89,6 +89,7 @@ struct super_operations lustre_super_operations =
         .alloc_inode   = ll_alloc_inode,
         .destroy_inode = ll_destroy_inode,
         .clear_inode   = ll_clear_inode,
+        .delete_inode  = ll_delete_inode,
         .put_super     = ll_put_super,
         .statfs        = ll_statfs,
         .umount_begin  = ll_umount_begin,