All of lore.kernel.org
 help / color / mirror / Atom feed
* Problem with building btrfs into the kernel instead of module
@ 2008-10-07 18:22 Arun Bhanu
  2008-10-07 19:44 ` Sage Weil
  0 siblings, 1 reply; 3+ messages in thread
From: Arun Bhanu @ 2008-10-07 18:22 UTC (permalink / raw)
  To: linux-btrfs

Hi

I have compiled btrfs into the kernel instead of building as module.
Then I create a btrfs filesystem on a partition and try to mount it and
I get the following error.

# mkfs.btrfs /dev/sda1
fs created label (null) on /dev/sda1
        nodesize 4096 leafsize 4096 sectorsize 4096 size 4.88GB
Btrfs v0.16-8-g09ab036

# mount -t btrfs /dev/sda1 /mnt/sda1/
mount: unknown filesystem type 'btrfs'

If I perform the above steps with btrfs built as a module I don't get
any error.

Is this a known issue or am I doing something wrong?

-Arun

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Problem with building btrfs into the kernel instead of module
  2008-10-07 18:22 Problem with building btrfs into the kernel instead of module Arun Bhanu
@ 2008-10-07 19:44 ` Sage Weil
  2008-10-08 17:41   ` Arun Bhanu
  0 siblings, 1 reply; 3+ messages in thread
From: Sage Weil @ 2008-10-07 19:44 UTC (permalink / raw)
  To: Arun Bhanu; +Cc: linux-btrfs

On Wed, 8 Oct 2008, Arun Bhanu wrote:
> Hi
> 
> I have compiled btrfs into the kernel instead of building as module.
> Then I create a btrfs filesystem on a partition and try to mount it and
> I get the following error.

fs/btrfs/Makefile is a bit wonky.  This at least makes it work both ways:


diff --git a/fs/btrfs/Makefile b/fs/btrfs/Makefile
index 48b7909..7125716 100644
--- a/fs/btrfs/Makefile
+++ b/fs/btrfs/Makefile
@@ -1,7 +1,7 @@
 ifneq ($(KERNELRELEASE),)
 # kbuild part of makefile
 
-obj-m  := btrfs.o
+obj-$(CONFIG_BTRFS_FS) := btrfs.o
 btrfs-y := super.o ctree.o extent-tree.o print-tree.o root-tree.o 
dir-item.o \
           file-item.o inode-item.o inode-map.o disk-io.o \
           transaction.o inode.o file.o tree-defrag.o \
@@ -14,7 +14,7 @@ else
 
 KERNELDIR := /lib/modules/`uname -r`/build
 all:
-       $(MAKE) -C $(KERNELDIR) M=`pwd` modules
+       $(MAKE) -C $(KERNELDIR) M=`pwd` CONFIG_BTRFS_FS=m modules
 
 modules_install:
        $(MAKE) -C $(KERNELDIR) M=`pwd` modules_install


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: Problem with building btrfs into the kernel instead of module
  2008-10-07 19:44 ` Sage Weil
@ 2008-10-08 17:41   ` Arun Bhanu
  0 siblings, 0 replies; 3+ messages in thread
From: Arun Bhanu @ 2008-10-08 17:41 UTC (permalink / raw)
  To: linux-btrfs

* Sage Weil (sage@newdream.net) wrote:
> On Wed, 8 Oct 2008, Arun Bhanu wrote:
> > Hi
> > 
> > I have compiled btrfs into the kernel instead of building as module.
> > Then I create a btrfs filesystem on a partition and try to mount it and
> > I get the following error.
> 
> fs/btrfs/Makefile is a bit wonky.  This at least makes it work both ways:

Thanks. With your patch applied, it is working as expected in both
cases.

> diff --git a/fs/btrfs/Makefile b/fs/btrfs/Makefile
> index 48b7909..7125716 100644
> --- a/fs/btrfs/Makefile
> +++ b/fs/btrfs/Makefile
> @@ -1,7 +1,7 @@
>  ifneq ($(KERNELRELEASE),)
>  # kbuild part of makefile
>  
> -obj-m  := btrfs.o
> +obj-$(CONFIG_BTRFS_FS) := btrfs.o
>  btrfs-y := super.o ctree.o extent-tree.o print-tree.o root-tree.o 
> dir-item.o \
>            file-item.o inode-item.o inode-map.o disk-io.o \
>            transaction.o inode.o file.o tree-defrag.o \
> @@ -14,7 +14,7 @@ else
>  
>  KERNELDIR := /lib/modules/`uname -r`/build
>  all:
> -       $(MAKE) -C $(KERNELDIR) M=`pwd` modules
> +       $(MAKE) -C $(KERNELDIR) M=`pwd` CONFIG_BTRFS_FS=m modules
>  
>  modules_install:
>         $(MAKE) -C $(KERNELDIR) M=`pwd` modules_install
> 

-Arun

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-10-08 17:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-07 18:22 Problem with building btrfs into the kernel instead of module Arun Bhanu
2008-10-07 19:44 ` Sage Weil
2008-10-08 17:41   ` Arun Bhanu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.