A complete fix for the memory leak caused by device_list_add()
is more complicated than initial idea and so sorry that I
have to pull back this patch as well.
The main reason-
There are uncoordinated scan for btrfs which would result
in doing the same thing multiple times.
For a eg: consider the following..
-----------
int cmd_check(int argc, char **argv)
{
::
if((ret = check_mounted(argv[optind])) < 0) {
::
info = open_ctree_fs_info(argv[optind], bytenr, 0, rw, 1);
-----------
Both of these functions (check_mounted() and open_ctree_fs_info())
would perform a complete scan of /dev separately. This is
one of the situation and there are quite a number of threads in
btrfs-progs which would scan the /dev multiple times.
this affects performance and will be noticeable
in data centers with large number of disks/luns.
I have to dig to develop a comprehensive fix, basically we need
to revamp and develop a centralized device identification
and management for the btrfs-progs which will also fix the
apparent memory leak issues.
Any feedback comments are welcome.
Thanks, Anand
> further, mkfs.c thread should call device_list_remove()
> as well, however mkfs.c uses a lot of in-flight exits()
> which makes it very difficult to bring in this fix into
> mkfs.c. I shall be doing it in a separate patch.
--
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