BOOL left = FALSE; BOOL disc = FALSE;	/* Discontinuity */ BOOL hole = FALSE;	/* Following a hole */ int magic; 
BOOL left = FALSE;	/* Left end of @src needs merging. */ BOOL disc = FALSE;	/* Discontinuity between @dst and @src. */ int marker;		/* End of the inserted runs. */ 
static inline runlist_element *ntfs_rl_insert(runlist_element *dst,		int dsize, runlist_element *src, int ssize, int loc){	BOOL left = FALSE;	BOOL disc = FALSE;	/* Discontinuity */	BOOL hole = FALSE;	/* Following a hole */	int magic;	BUG_ON(!dst);	BUG_ON(!src);	/* disc => Discontinuity between the end of @dst and the start of @src.	 *	   This means we might need to insert a hole.	 * hole => @dst ends with a hole or an unmapped region which we can	 *	   extend to match the discontinuity. */	if (loc == 0)		disc = (src[0].vcn > 0);	else {		s64 merged_length;		left = ntfs_are_rl_mergeable(dst + loc - 1, src);		merged_length = dst[loc - 1].length;		if (left)			merged_length += src->length;		disc = (src[0].vcn > dst[loc - 1].vcn + merged_length);		if (disc)			hole = (dst[loc - 1].lcn == LCN_HOLE);	}	/* Space required: @dst size + @src size, less one if we merged, plus	 * one if there was a discontinuity, less one for a trailing hole. */	dst = ntfs_rl_realloc(dst, dsize, dsize + ssize - left + disc - hole);	if (IS_ERR(dst))		return dst;	/*	 * We are guaranteed to succeed from here so can start modifying the	 * original runlist.	 */	if (left)		__ntfs_rl_merge(dst + loc - 1, src);	magic = loc + ssize - left + disc - hole;	/* Move the tail of @dst out of the way, then copy in @src. */	ntfs_rl_mm(dst, magic, loc, dsize - loc);	ntfs_rl_mc(dst, loc + disc - hole, src, left, ssize - left);	/* Adjust the VCN of the last run ... */	if (dst[magic].lcn <= LCN_HOLE)		dst[magic].vcn = dst[magic - 1].vcn + dst[magic - 1].length;	/* ... and the length. */	if (dst[magic].lcn == LCN_HOLE || dst[magic].lcn == LCN_RL_NOT_MAPPED)		dst[magic].length = dst[magic + 1].vcn - dst[magic].vcn;	/* Writing beyond the end of the file and there's a discontinuity. */	if (disc) {		if (hole)			dst[loc - 1].length = dst[loc].vcn - dst[loc - 1].vcn;		else {			if (loc > 0) {				dst[loc].vcn = dst[loc - 1].vcn +						dst[loc - 1].length;				dst[loc].length = dst[loc + 1].vcn -						dst[loc].vcn;			} else {				dst[loc].vcn = 0;				dst[loc].length = dst[loc + 1].vcn;			}			dst[loc].lcn = LCN_RL_NOT_MAPPED;		}		magic += hole;		if (dst[magic].lcn == LCN_ENOENT)			dst[magic].vcn = dst[magic - 1].vcn +					dst[magic - 1].length;	}	return dst;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/5c9f6de3b80ca46000bd1b63d892820f9ee32138/runlist.c/clean/fs/ntfs/runlist.c