Am 01.10.2013 09:48, schrieb sf...@users.sourceforge.net:

> Florian Klink:
>> It works in almost all cases, but loop needs to be set as a dependency
>> for aufs in Kconfig.
> Why?
> AUFS_BDEV_LOOP already sets "depends on BLK_DEV_LOOP".
>
>
> J. R. Okajima

Yes, you're right, making whole FS_AUFS depend
on BLK_DEV_LOOP is overkill, that's why AUFS_BDEV_LOOP exists.

But I looked at it, and unfortunately, it's not enough,
as BLK_DEV_LOOP=m && AUFS_FS=y will turn
AUFS_BDEV_LOOP to "y", which will obviously not work.

I wrote all possible combinations of
BLK_DEV_LOOP and FS_AUFS and how AUFS_BDEV_LOOP
should look like into this table:

BLK_DEV_LOOP | AUFS_FS || AUFS_BDEV_LOOP
-------------|---------||---------------
           n |       n ||              n
           n |       m ||              n
           n |       y ||              n
           m |       n ||              n
           m |       m ||              y
           m |       y ||              n
           y |       n ||              n
           y |       m ||              y
           y |       y ||              y

which can be expressed as

AUFS_BDEV_LOOP = ((BLK_DEV_LOOP=m && AUFS_FS=m) || (BLK_DEV_LOOP=y && 
AUFS_FS=m) || (BLK_DEV_LOOP=y && AUFS_FS=y))
               = ((BLK_DEV_LOOP=m && AUFS_FS=m) || (BLK_DEV_LOOP=y && AUFS_FS))

so I updated the Kconfig for AUFS_BDEV and applied this as a patch :-)

Florian

>From 5e953f9daf2730c9bb09f49be089f09d2555181d Mon Sep 17 00:00:00 2001
From: Florian Klink <flo...@flokli.de>
Date: Tue, 1 Oct 2013 15:19:08 +0200
Subject: [PATCH] aufs: for 3.11, handle BLK_DEV_LOOP=m

Replace symbol_get() by symbol_request()
to force loading "loop" module if BLK_DEV_LOOP=m.
Also correct AUFS_BDEV_LOOP attribute in Kconfig
---
 fs/aufs/Kconfig | 3 +--
 fs/aufs/loop.c  | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/fs/aufs/Kconfig b/fs/aufs/Kconfig
index 6228e27..910f35a 100644
--- a/fs/aufs/Kconfig
+++ b/fs/aufs/Kconfig
@@ -180,8 +180,7 @@ config AUFS_BR_HFSPLUS
 
 config AUFS_BDEV_LOOP
 	bool
-	depends on BLK_DEV_LOOP
-	default y
+	default y if ((BLK_DEV_LOOP=m && AUFS_FS=m) || (BLK_DEV_LOOP=y && AUFS_FS))
 	help
 	Automatic configuration for internal use.
 	Convert =[ym] into =y.
diff --git a/fs/aufs/loop.c b/fs/aufs/loop.c
index a5c4e7a..852f67d 100644
--- a/fs/aufs/loop.c
+++ b/fs/aufs/loop.c
@@ -129,7 +129,7 @@ int au_loopback_init(void)
 		goto out;
 
 	err = 0;
-	backing_file_func = symbol_get(loop_backing_file);
+       backing_file_func = symbol_request(loop_backing_file);
 	if (backing_file_func)
 		goto out; /* success */
 
-- 
1.8.4

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&iu=/4140/ostg.clktrk

Reply via email to