Whamcloud - gitweb
b=18293
[fs/lustre-release.git] / lustre / llite / llite_fid.c
index 63b9af2..eab0e84 100644 (file)
@@ -16,8 +16,8 @@
  * in the LICENSE file that accompanied this code).
  *
  * You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see [sun.com URL with a
- * copy of GPLv2].
+ * 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
@@ -69,7 +69,7 @@ ino_t ll_fid_build_ino(struct ll_sb_info *sbi,
          * Very stupid and having many downsides inode allocation algorithm
          * based on fid.
          */
-        ino = fid_flatten(fid);
+        ino = fid_flatten(fid) & 0xFFFFFFFF;
 
         if (unlikely(ino == 0))
                 /* the first result ino is 0xFFC001, so this is rarely used */
@@ -77,3 +77,15 @@ ino_t ll_fid_build_ino(struct ll_sb_info *sbi,
         ino = ino | 0x80000000;
         RETURN(ino);
 }
+
+__u32 ll_fid_build_gen(struct ll_sb_info *sbi,
+                       struct lu_fid *fid)
+{
+        __u32 gen = 0;
+        ENTRY;
+
+        if (fid_is_igif(fid)) {
+                gen = lu_igif_gen(fid);
+        }
+        RETURN(gen);
+}