Re: [patch] brd: support discard

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 26, 2010 at 11:33:42PM +1000, Nick Piggin wrote:
> +static void discard_from_brd(struct brd_device *brd,
> +			sector_t sector, size_t n)
> +{
> +	while (n >= PAGE_SIZE) {
> +		/*
> +		 * Don't want to actually discard pages here because
> +		 * re-allocating the pages can result in writeback
> +		 * deadlocks under heavy load.
> +		 */
> +		if (0)
> +			brd_free_page(brd, sector);
> +		else
> +			brd_zero_page(brd, sector);

That if (0) looks a little suspicious... ;-)

regards, Kyle
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux