RE: [PATCH] Btrfs: fix subvolume mount by name problem when default mount subvolume is set

2011-04-06 Thread Zhong, Xin
 -Original Message-
 From: Chris Mason [mailto:chris.ma...@oracle.com]
 Sent: Tuesday, April 05, 2011 1:07 PM
 To: Zhong, Xin
 Cc: linux-btrfs
 Subject: Re: [PATCH] Btrfs: fix subvolume mount by name problem when
 default mount subvolume is set
 
 Excerpts from Zhong, Xin's message of 2011-03-31 03:59:22 -0400:
  We create two subvolumes (meego_root and meego_home) in
  btrfs root directory. And set meego_root as default mount
  subvolume. After we remount btrfs, meego_root is mounted
  to top directory by default. Then when we try to mount
  meego_home (subvol=meego_home) to a subdirectory, it failed.
  The problem is when default mount subvolume is set to
  meego_root, we search meego_home in it but can not find it.
  So the solution is to search meego_home in btrfs root
  directory instead when subvol=meego_home is given.
 
 I think this one is difficult because if they have set the default
 subvolume they might have done so because the original default has the
 result of a busted upgrade or something in it.
 
 So, I think the subvol= should be relative to the default.  Would it
 work for you to add a new mount option to specify the subvol id to
 search for subvol=?
 

Sounds good. I will submit a new version. Thanks!

 -chris
N�r��yb�X��ǧv�^�)޺{.n�+{�n�߲)w*jg����ݢj/���z�ޖ��2�ޙ�)ߡ�a�����G���h��j:+v���w��٥

Re: [PATCH] Btrfs: fix subvolume mount by name problem when default mount subvolume is set

2011-04-04 Thread Chris Mason
Excerpts from Zhong, Xin's message of 2011-03-31 03:59:22 -0400:
 We create two subvolumes (meego_root and meego_home) in
 btrfs root directory. And set meego_root as default mount
 subvolume. After we remount btrfs, meego_root is mounted
 to top directory by default. Then when we try to mount
 meego_home (subvol=meego_home) to a subdirectory, it failed.
 The problem is when default mount subvolume is set to
 meego_root, we search meego_home in it but can not find it.
 So the solution is to search meego_home in btrfs root
 directory instead when subvol=meego_home is given.

I think this one is difficult because if they have set the default
subvolume they might have done so because the original default has the
result of a busted upgrade or something in it.

So, I think the subvol= should be relative to the default.  Would it
work for you to add a new mount option to specify the subvol id to
search for subvol=?

-chris
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html