Exemplo n.º 1
0
        public static bool Checkout_Wip2(RedFS_Inode inowip, RedFS_Inode mywip, int m_ino)
        {
            WIP_TYPE oldtype = mywip.get_wiptype();

            for (int i = 0; i < 16; i++)
            {
                DEFS.ASSERT(mywip.get_child_dbn(i) == DBN.INVALID, "Wip cannot be valid during checkout, " +
                            i + " value = " + mywip.get_child_dbn(i));
            }
            long fileoffset = m_ino * 128;

            lock (inowip)
            {
                REDDY.ptrRedFS.redfs_read(inowip, fileoffset, mywip.data, 0, 128);
                if (oldtype != WIP_TYPE.UNDEFINED)
                {
                    mywip.set_wiptype(oldtype);
                }
            }
            DEFS.DEBUG("CO_WIP", mywip.get_string_rep2());
            return(mywip.verify_inode_number());
        }