Changes by: antona
Update of /cvsroot/linux-ntfs/ntfs-driver-tng/scripts
In directory usw-pr-cvs1:/tmp/cvs-serv18263
Modified Files:
rl.c
Log Message:
update
Index: rl.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfs-driver-tng/scripts/rl.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -U2 -r1.3 -r1.4
--- rl.c 10 Feb 2002 19:24:03 -0000 1.3
+++ rl.c 10 Feb 2002 19:34:28 -0000 1.4
@@ -303,33 +303,4 @@
}
-/**
- * merge_run_lists - merge two run_lists into one
- * @drl: The original run_list.
- * @srl: The new run_list to be merge into @drl.
- *
- * First we sanity check the two run_lists to make sure that they are sensible
- * and can be merged. The @srl run_list must be either after the @drl run_list
- * or completely within a hole in @drl.
- *
- * Merging of run lists is necessary in two cases:
- * 1. When attribute lists are used and a further extent is being mapped.
- * 2. When new clusters are allocated to fill a hole or extend a file.
- *
- * There are four possible ways @srl can be merged. It can be inserted at
- * the beginning of a hole; split the hole in two; appended at the end of
- * a hole; replace the whole hole. It can also be appended to the end of
- * the run_list, which is just a variant of the insert case.
- *
- * N.B. Either, or both, of the input pointers may be freed if the function
- * is successful. Only the returned pointer may be used.
- *
- * If the function fails, neither of the input run_lists may be safe.
- *
- * Return: Pointer, The resultant merged run_list.
- *
- * Errors: -ENOMEM, Not enough memory to allocate run list array.
- * -EINVAL, Invalid parameters were passed in.
- * -ERANGE, The run_lists overlap and cannot be merged.
- */
run_list * merge_run_lists (run_list *drl, run_list *srl)
{
@@ -442,10 +413,12 @@
// FIXME: RAR This looks dodgy... drl[dins].lcn might well be LCN_ENOENT
// at end of file. Is just the comment wrong? (AIA)
- start = ((drl[dins].lcn == LCN_RL_NOT_MAPPED) || /* End of file */
+ start = ((drl[dins].lcn < LCN_HOLE) || /* End of file */
(drl[dins].vcn == srl[sstart].vcn)); /* Start of hole */
- finish = ((drl[dins].lcn != LCN_RL_NOT_MAPPED) && /* End of file */
+ finish = ((drl[dins].lcn > LCN_RL_NOT_MAPPED) && /* End of file */
((drl[dins].vcn + drl[dins].length) <= /* End of hole */
(srl[send-1].vcn + srl[send-1].length)));
+ ntfs_debug("sstart = %i, finish = %i\n", start, finish);
+ ntfs_debug("ds = %i, ss = %i, dins = %i\n", ds, ss, dins);
if (start)
if (finish)
|