How to know if ext4lazyinit feature is enabled in your kernel or not?












1















I would be formatting a newish large capacity 4 TB hdd in few hours. From what little I understand, I could just format it and it will look to be formatted.



If I format it in real-time then it would probably take a long time, 10000 rpm x 4 GB DDR3 RAM. Hence Linux came up with the concept of ext4lazyinit.



I'm running Debian GNU/Linux 'Stretch' and have kernel 4.9 .



[$] uname -a

Linux debian 4.9.0-1-amd64 #1 SMP Debian 4.9.2-2 (2017-01-12) x86_64 GNU/Linux

[$] lsb_release -a

No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.0 (stretch)
Release: 9.0
Codename: stretch


Now, according to the wiki it says and I quote -




If enabled and the uninit_bg feature is enabled, the inode table will
not be fully initialized by mke2fs. This speeds up file system
initialization noticeably, but it requires the kernel to finish
initializing the file system in the background when the file system is
first mounted. If the option value is omitted, it defaults to 1 to
enable lazy inode table zeroing. - Thomas Kenn




Now is there a way to know if the above feature is enabled in my kernel or not ?



Update -



there is a /boot/config-4.9.0-1-amd64 . The file is 7865 lines long according to -



[$] cat /boot/config-4.9.0-1-amd64 | tail -n 1

7865 CONFIG_SBITMAP=y


Trying to grep doesn't lead anywhere -



[$] cat /boot/config-4.9.0-1-amd64 | grep LAZY


OR even ext4 for that manner -



[$] cat /boot/config-4.9.0-1-amd64 | grep EXT4

6895 CONFIG_EXT4_FS=m
6896 CONFIG_EXT4_USE_FOR_EXT2=y
6897 CONFIG_EXT4_FS_POSIX_ACL=y
6898 CONFIG_EXT4_FS_SECURITY=y
6899 CONFIG_EXT4_ENCRYPTION=y
6900 CONFIG_EXT4_FS_ENCRYPTION=y
6901 # CONFIG_EXT4_DEBUG is not set


Any ideas anybody ?










share|improve this question

























  • Ext4 formatting of large harddrives is much faster, it was one of the improvements of the ext4. But even with ext3 hadn't been it so long.

    – peterh
    Jan 29 '17 at 18:49











  • lazy_itable_init is turned on by default if the kernel you are running supports automatic background initialization of the inode table ( 2.6.37+ ).

    – don_crissti
    Jan 29 '17 at 18:55











  • @don_crissti while I know that, is there a command or something to check the values to see, know that's it turned on ?

    – shirish
    Jan 29 '17 at 18:57











  • @don_crissti I am not dis-believing you or anything, but there should be a way to find these things, isn't there ?

    – shirish
    Jan 29 '17 at 19:31






  • 1





    Find what ? Unless you used mkfs with -E lazy_itable_init=0 it is enabled by default. You don't have to believe me, see for yourself: mke2fs: Enable lazy_itable_init on newer kernel by default And by the way - this doesn't format faster - it just lets you use the fs while it continues formatting in the background after the 1st mount...

    – don_crissti
    Jan 29 '17 at 19:47


















1















I would be formatting a newish large capacity 4 TB hdd in few hours. From what little I understand, I could just format it and it will look to be formatted.



If I format it in real-time then it would probably take a long time, 10000 rpm x 4 GB DDR3 RAM. Hence Linux came up with the concept of ext4lazyinit.



I'm running Debian GNU/Linux 'Stretch' and have kernel 4.9 .



[$] uname -a

Linux debian 4.9.0-1-amd64 #1 SMP Debian 4.9.2-2 (2017-01-12) x86_64 GNU/Linux

[$] lsb_release -a

No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.0 (stretch)
Release: 9.0
Codename: stretch


Now, according to the wiki it says and I quote -




If enabled and the uninit_bg feature is enabled, the inode table will
not be fully initialized by mke2fs. This speeds up file system
initialization noticeably, but it requires the kernel to finish
initializing the file system in the background when the file system is
first mounted. If the option value is omitted, it defaults to 1 to
enable lazy inode table zeroing. - Thomas Kenn




Now is there a way to know if the above feature is enabled in my kernel or not ?



Update -



there is a /boot/config-4.9.0-1-amd64 . The file is 7865 lines long according to -



[$] cat /boot/config-4.9.0-1-amd64 | tail -n 1

7865 CONFIG_SBITMAP=y


Trying to grep doesn't lead anywhere -



[$] cat /boot/config-4.9.0-1-amd64 | grep LAZY


OR even ext4 for that manner -



[$] cat /boot/config-4.9.0-1-amd64 | grep EXT4

6895 CONFIG_EXT4_FS=m
6896 CONFIG_EXT4_USE_FOR_EXT2=y
6897 CONFIG_EXT4_FS_POSIX_ACL=y
6898 CONFIG_EXT4_FS_SECURITY=y
6899 CONFIG_EXT4_ENCRYPTION=y
6900 CONFIG_EXT4_FS_ENCRYPTION=y
6901 # CONFIG_EXT4_DEBUG is not set


Any ideas anybody ?










share|improve this question

























  • Ext4 formatting of large harddrives is much faster, it was one of the improvements of the ext4. But even with ext3 hadn't been it so long.

    – peterh
    Jan 29 '17 at 18:49











  • lazy_itable_init is turned on by default if the kernel you are running supports automatic background initialization of the inode table ( 2.6.37+ ).

    – don_crissti
    Jan 29 '17 at 18:55











  • @don_crissti while I know that, is there a command or something to check the values to see, know that's it turned on ?

    – shirish
    Jan 29 '17 at 18:57











  • @don_crissti I am not dis-believing you or anything, but there should be a way to find these things, isn't there ?

    – shirish
    Jan 29 '17 at 19:31






  • 1





    Find what ? Unless you used mkfs with -E lazy_itable_init=0 it is enabled by default. You don't have to believe me, see for yourself: mke2fs: Enable lazy_itable_init on newer kernel by default And by the way - this doesn't format faster - it just lets you use the fs while it continues formatting in the background after the 1st mount...

    – don_crissti
    Jan 29 '17 at 19:47
















1












1








1


1






I would be formatting a newish large capacity 4 TB hdd in few hours. From what little I understand, I could just format it and it will look to be formatted.



If I format it in real-time then it would probably take a long time, 10000 rpm x 4 GB DDR3 RAM. Hence Linux came up with the concept of ext4lazyinit.



I'm running Debian GNU/Linux 'Stretch' and have kernel 4.9 .



[$] uname -a

Linux debian 4.9.0-1-amd64 #1 SMP Debian 4.9.2-2 (2017-01-12) x86_64 GNU/Linux

[$] lsb_release -a

No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.0 (stretch)
Release: 9.0
Codename: stretch


Now, according to the wiki it says and I quote -




If enabled and the uninit_bg feature is enabled, the inode table will
not be fully initialized by mke2fs. This speeds up file system
initialization noticeably, but it requires the kernel to finish
initializing the file system in the background when the file system is
first mounted. If the option value is omitted, it defaults to 1 to
enable lazy inode table zeroing. - Thomas Kenn




Now is there a way to know if the above feature is enabled in my kernel or not ?



Update -



there is a /boot/config-4.9.0-1-amd64 . The file is 7865 lines long according to -



[$] cat /boot/config-4.9.0-1-amd64 | tail -n 1

7865 CONFIG_SBITMAP=y


Trying to grep doesn't lead anywhere -



[$] cat /boot/config-4.9.0-1-amd64 | grep LAZY


OR even ext4 for that manner -



[$] cat /boot/config-4.9.0-1-amd64 | grep EXT4

6895 CONFIG_EXT4_FS=m
6896 CONFIG_EXT4_USE_FOR_EXT2=y
6897 CONFIG_EXT4_FS_POSIX_ACL=y
6898 CONFIG_EXT4_FS_SECURITY=y
6899 CONFIG_EXT4_ENCRYPTION=y
6900 CONFIG_EXT4_FS_ENCRYPTION=y
6901 # CONFIG_EXT4_DEBUG is not set


Any ideas anybody ?










share|improve this question
















I would be formatting a newish large capacity 4 TB hdd in few hours. From what little I understand, I could just format it and it will look to be formatted.



If I format it in real-time then it would probably take a long time, 10000 rpm x 4 GB DDR3 RAM. Hence Linux came up with the concept of ext4lazyinit.



I'm running Debian GNU/Linux 'Stretch' and have kernel 4.9 .



[$] uname -a

Linux debian 4.9.0-1-amd64 #1 SMP Debian 4.9.2-2 (2017-01-12) x86_64 GNU/Linux

[$] lsb_release -a

No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.0 (stretch)
Release: 9.0
Codename: stretch


Now, according to the wiki it says and I quote -




If enabled and the uninit_bg feature is enabled, the inode table will
not be fully initialized by mke2fs. This speeds up file system
initialization noticeably, but it requires the kernel to finish
initializing the file system in the background when the file system is
first mounted. If the option value is omitted, it defaults to 1 to
enable lazy inode table zeroing. - Thomas Kenn




Now is there a way to know if the above feature is enabled in my kernel or not ?



Update -



there is a /boot/config-4.9.0-1-amd64 . The file is 7865 lines long according to -



[$] cat /boot/config-4.9.0-1-amd64 | tail -n 1

7865 CONFIG_SBITMAP=y


Trying to grep doesn't lead anywhere -



[$] cat /boot/config-4.9.0-1-amd64 | grep LAZY


OR even ext4 for that manner -



[$] cat /boot/config-4.9.0-1-amd64 | grep EXT4

6895 CONFIG_EXT4_FS=m
6896 CONFIG_EXT4_USE_FOR_EXT2=y
6897 CONFIG_EXT4_FS_POSIX_ACL=y
6898 CONFIG_EXT4_FS_SECURITY=y
6899 CONFIG_EXT4_ENCRYPTION=y
6900 CONFIG_EXT4_FS_ENCRYPTION=y
6901 # CONFIG_EXT4_DEBUG is not set


Any ideas anybody ?







debian kernel ext4






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 29 '17 at 19:47







shirish

















asked Jan 29 '17 at 18:27









shirishshirish

3,83263488




3,83263488













  • Ext4 formatting of large harddrives is much faster, it was one of the improvements of the ext4. But even with ext3 hadn't been it so long.

    – peterh
    Jan 29 '17 at 18:49











  • lazy_itable_init is turned on by default if the kernel you are running supports automatic background initialization of the inode table ( 2.6.37+ ).

    – don_crissti
    Jan 29 '17 at 18:55











  • @don_crissti while I know that, is there a command or something to check the values to see, know that's it turned on ?

    – shirish
    Jan 29 '17 at 18:57











  • @don_crissti I am not dis-believing you or anything, but there should be a way to find these things, isn't there ?

    – shirish
    Jan 29 '17 at 19:31






  • 1





    Find what ? Unless you used mkfs with -E lazy_itable_init=0 it is enabled by default. You don't have to believe me, see for yourself: mke2fs: Enable lazy_itable_init on newer kernel by default And by the way - this doesn't format faster - it just lets you use the fs while it continues formatting in the background after the 1st mount...

    – don_crissti
    Jan 29 '17 at 19:47





















  • Ext4 formatting of large harddrives is much faster, it was one of the improvements of the ext4. But even with ext3 hadn't been it so long.

    – peterh
    Jan 29 '17 at 18:49











  • lazy_itable_init is turned on by default if the kernel you are running supports automatic background initialization of the inode table ( 2.6.37+ ).

    – don_crissti
    Jan 29 '17 at 18:55











  • @don_crissti while I know that, is there a command or something to check the values to see, know that's it turned on ?

    – shirish
    Jan 29 '17 at 18:57











  • @don_crissti I am not dis-believing you or anything, but there should be a way to find these things, isn't there ?

    – shirish
    Jan 29 '17 at 19:31






  • 1





    Find what ? Unless you used mkfs with -E lazy_itable_init=0 it is enabled by default. You don't have to believe me, see for yourself: mke2fs: Enable lazy_itable_init on newer kernel by default And by the way - this doesn't format faster - it just lets you use the fs while it continues formatting in the background after the 1st mount...

    – don_crissti
    Jan 29 '17 at 19:47



















Ext4 formatting of large harddrives is much faster, it was one of the improvements of the ext4. But even with ext3 hadn't been it so long.

– peterh
Jan 29 '17 at 18:49





Ext4 formatting of large harddrives is much faster, it was one of the improvements of the ext4. But even with ext3 hadn't been it so long.

– peterh
Jan 29 '17 at 18:49













lazy_itable_init is turned on by default if the kernel you are running supports automatic background initialization of the inode table ( 2.6.37+ ).

– don_crissti
Jan 29 '17 at 18:55





lazy_itable_init is turned on by default if the kernel you are running supports automatic background initialization of the inode table ( 2.6.37+ ).

– don_crissti
Jan 29 '17 at 18:55













@don_crissti while I know that, is there a command or something to check the values to see, know that's it turned on ?

– shirish
Jan 29 '17 at 18:57





@don_crissti while I know that, is there a command or something to check the values to see, know that's it turned on ?

– shirish
Jan 29 '17 at 18:57













@don_crissti I am not dis-believing you or anything, but there should be a way to find these things, isn't there ?

– shirish
Jan 29 '17 at 19:31





@don_crissti I am not dis-believing you or anything, but there should be a way to find these things, isn't there ?

– shirish
Jan 29 '17 at 19:31




1




1





Find what ? Unless you used mkfs with -E lazy_itable_init=0 it is enabled by default. You don't have to believe me, see for yourself: mke2fs: Enable lazy_itable_init on newer kernel by default And by the way - this doesn't format faster - it just lets you use the fs while it continues formatting in the background after the 1st mount...

– don_crissti
Jan 29 '17 at 19:47







Find what ? Unless you used mkfs with -E lazy_itable_init=0 it is enabled by default. You don't have to believe me, see for yourself: mke2fs: Enable lazy_itable_init on newer kernel by default And by the way - this doesn't format faster - it just lets you use the fs while it continues formatting in the background after the 1st mount...

– don_crissti
Jan 29 '17 at 19:47












2 Answers
2






active

oldest

votes


















1














Google for its kernel compilation string (or check this in the "make menuconfig" of the kernel source). It surely starts with CONFIG_EXT4_FS_ . These kernel compilation flags of your actually running kernel are can be provided in /proc/config.gz (but doing this is also a kernel compile flag, thus it may or may not be enabled on your system), or by your distribution in /boot/config-your-kernel-version (your distrib may or may not provide this).



As I can remember, it is an old (at least 5 years) feature, thus your kernel probably supports it.



Online ext4 resizement doesn't work with some highly finetuned mke4fs configurations (sorry I forgot exactly what - some of the ext4 fs flags makes it impossible).






share|improve this answer
























  • I did try using a search-engine and I don't wanna make a custom kernel, I just want to know if there is a way to know it's enabled or not. Also thre is no /proc/config.gz on my /proc directory.

    – shirish
    Jan 29 '17 at 19:01













  • @shirish Then check in /proc/config.gz or in /boot/config-x.y.z, as I wrote.

    – peterh
    Jan 29 '17 at 19:03











  • I have updated/added new info. maybe that gives more light.

    – shirish
    Jan 29 '17 at 19:47





















0














I've been working on a bug related to this ext4 feature. So far as I can tell from the kernel source (linux 4.15.x) there is no feature called 'uninit_bg'.
It looks like it's just baked in to the ext4 filesystem, although the key feature in question is called 'lazy_itable_init'. There's be a few changes in this code and perhaps the comments + docs need to catch up with reality.



When using mkfs you can add the -E lazy_itable_init=0 option as other people has said - I don't think this attribute gets stored in the filesystem's metadata - the kernel thread for handling the lazy init is triggered or not dependent upon whether lazy_itable_init is set, but once all block groups on the FS have the ITABLE_ZEROED flag set then the filesystem is initialised and that's that - i.e. the method of initialisation stops being of any relevance.






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "106"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f341015%2fhow-to-know-if-ext4lazyinit-feature-is-enabled-in-your-kernel-or-not%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Google for its kernel compilation string (or check this in the "make menuconfig" of the kernel source). It surely starts with CONFIG_EXT4_FS_ . These kernel compilation flags of your actually running kernel are can be provided in /proc/config.gz (but doing this is also a kernel compile flag, thus it may or may not be enabled on your system), or by your distribution in /boot/config-your-kernel-version (your distrib may or may not provide this).



    As I can remember, it is an old (at least 5 years) feature, thus your kernel probably supports it.



    Online ext4 resizement doesn't work with some highly finetuned mke4fs configurations (sorry I forgot exactly what - some of the ext4 fs flags makes it impossible).






    share|improve this answer
























    • I did try using a search-engine and I don't wanna make a custom kernel, I just want to know if there is a way to know it's enabled or not. Also thre is no /proc/config.gz on my /proc directory.

      – shirish
      Jan 29 '17 at 19:01













    • @shirish Then check in /proc/config.gz or in /boot/config-x.y.z, as I wrote.

      – peterh
      Jan 29 '17 at 19:03











    • I have updated/added new info. maybe that gives more light.

      – shirish
      Jan 29 '17 at 19:47


















    1














    Google for its kernel compilation string (or check this in the "make menuconfig" of the kernel source). It surely starts with CONFIG_EXT4_FS_ . These kernel compilation flags of your actually running kernel are can be provided in /proc/config.gz (but doing this is also a kernel compile flag, thus it may or may not be enabled on your system), or by your distribution in /boot/config-your-kernel-version (your distrib may or may not provide this).



    As I can remember, it is an old (at least 5 years) feature, thus your kernel probably supports it.



    Online ext4 resizement doesn't work with some highly finetuned mke4fs configurations (sorry I forgot exactly what - some of the ext4 fs flags makes it impossible).






    share|improve this answer
























    • I did try using a search-engine and I don't wanna make a custom kernel, I just want to know if there is a way to know it's enabled or not. Also thre is no /proc/config.gz on my /proc directory.

      – shirish
      Jan 29 '17 at 19:01













    • @shirish Then check in /proc/config.gz or in /boot/config-x.y.z, as I wrote.

      – peterh
      Jan 29 '17 at 19:03











    • I have updated/added new info. maybe that gives more light.

      – shirish
      Jan 29 '17 at 19:47
















    1












    1








    1







    Google for its kernel compilation string (or check this in the "make menuconfig" of the kernel source). It surely starts with CONFIG_EXT4_FS_ . These kernel compilation flags of your actually running kernel are can be provided in /proc/config.gz (but doing this is also a kernel compile flag, thus it may or may not be enabled on your system), or by your distribution in /boot/config-your-kernel-version (your distrib may or may not provide this).



    As I can remember, it is an old (at least 5 years) feature, thus your kernel probably supports it.



    Online ext4 resizement doesn't work with some highly finetuned mke4fs configurations (sorry I forgot exactly what - some of the ext4 fs flags makes it impossible).






    share|improve this answer













    Google for its kernel compilation string (or check this in the "make menuconfig" of the kernel source). It surely starts with CONFIG_EXT4_FS_ . These kernel compilation flags of your actually running kernel are can be provided in /proc/config.gz (but doing this is also a kernel compile flag, thus it may or may not be enabled on your system), or by your distribution in /boot/config-your-kernel-version (your distrib may or may not provide this).



    As I can remember, it is an old (at least 5 years) feature, thus your kernel probably supports it.



    Online ext4 resizement doesn't work with some highly finetuned mke4fs configurations (sorry I forgot exactly what - some of the ext4 fs flags makes it impossible).







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Jan 29 '17 at 18:57









    peterhpeterh

    4,477113160




    4,477113160













    • I did try using a search-engine and I don't wanna make a custom kernel, I just want to know if there is a way to know it's enabled or not. Also thre is no /proc/config.gz on my /proc directory.

      – shirish
      Jan 29 '17 at 19:01













    • @shirish Then check in /proc/config.gz or in /boot/config-x.y.z, as I wrote.

      – peterh
      Jan 29 '17 at 19:03











    • I have updated/added new info. maybe that gives more light.

      – shirish
      Jan 29 '17 at 19:47





















    • I did try using a search-engine and I don't wanna make a custom kernel, I just want to know if there is a way to know it's enabled or not. Also thre is no /proc/config.gz on my /proc directory.

      – shirish
      Jan 29 '17 at 19:01













    • @shirish Then check in /proc/config.gz or in /boot/config-x.y.z, as I wrote.

      – peterh
      Jan 29 '17 at 19:03











    • I have updated/added new info. maybe that gives more light.

      – shirish
      Jan 29 '17 at 19:47



















    I did try using a search-engine and I don't wanna make a custom kernel, I just want to know if there is a way to know it's enabled or not. Also thre is no /proc/config.gz on my /proc directory.

    – shirish
    Jan 29 '17 at 19:01







    I did try using a search-engine and I don't wanna make a custom kernel, I just want to know if there is a way to know it's enabled or not. Also thre is no /proc/config.gz on my /proc directory.

    – shirish
    Jan 29 '17 at 19:01















    @shirish Then check in /proc/config.gz or in /boot/config-x.y.z, as I wrote.

    – peterh
    Jan 29 '17 at 19:03





    @shirish Then check in /proc/config.gz or in /boot/config-x.y.z, as I wrote.

    – peterh
    Jan 29 '17 at 19:03













    I have updated/added new info. maybe that gives more light.

    – shirish
    Jan 29 '17 at 19:47







    I have updated/added new info. maybe that gives more light.

    – shirish
    Jan 29 '17 at 19:47















    0














    I've been working on a bug related to this ext4 feature. So far as I can tell from the kernel source (linux 4.15.x) there is no feature called 'uninit_bg'.
    It looks like it's just baked in to the ext4 filesystem, although the key feature in question is called 'lazy_itable_init'. There's be a few changes in this code and perhaps the comments + docs need to catch up with reality.



    When using mkfs you can add the -E lazy_itable_init=0 option as other people has said - I don't think this attribute gets stored in the filesystem's metadata - the kernel thread for handling the lazy init is triggered or not dependent upon whether lazy_itable_init is set, but once all block groups on the FS have the ITABLE_ZEROED flag set then the filesystem is initialised and that's that - i.e. the method of initialisation stops being of any relevance.






    share|improve this answer




























      0














      I've been working on a bug related to this ext4 feature. So far as I can tell from the kernel source (linux 4.15.x) there is no feature called 'uninit_bg'.
      It looks like it's just baked in to the ext4 filesystem, although the key feature in question is called 'lazy_itable_init'. There's be a few changes in this code and perhaps the comments + docs need to catch up with reality.



      When using mkfs you can add the -E lazy_itable_init=0 option as other people has said - I don't think this attribute gets stored in the filesystem's metadata - the kernel thread for handling the lazy init is triggered or not dependent upon whether lazy_itable_init is set, but once all block groups on the FS have the ITABLE_ZEROED flag set then the filesystem is initialised and that's that - i.e. the method of initialisation stops being of any relevance.






      share|improve this answer


























        0












        0








        0







        I've been working on a bug related to this ext4 feature. So far as I can tell from the kernel source (linux 4.15.x) there is no feature called 'uninit_bg'.
        It looks like it's just baked in to the ext4 filesystem, although the key feature in question is called 'lazy_itable_init'. There's be a few changes in this code and perhaps the comments + docs need to catch up with reality.



        When using mkfs you can add the -E lazy_itable_init=0 option as other people has said - I don't think this attribute gets stored in the filesystem's metadata - the kernel thread for handling the lazy init is triggered or not dependent upon whether lazy_itable_init is set, but once all block groups on the FS have the ITABLE_ZEROED flag set then the filesystem is initialised and that's that - i.e. the method of initialisation stops being of any relevance.






        share|improve this answer













        I've been working on a bug related to this ext4 feature. So far as I can tell from the kernel source (linux 4.15.x) there is no feature called 'uninit_bg'.
        It looks like it's just baked in to the ext4 filesystem, although the key feature in question is called 'lazy_itable_init'. There's be a few changes in this code and perhaps the comments + docs need to catch up with reality.



        When using mkfs you can add the -E lazy_itable_init=0 option as other people has said - I don't think this attribute gets stored in the filesystem's metadata - the kernel thread for handling the lazy init is triggered or not dependent upon whether lazy_itable_init is set, but once all block groups on the FS have the ITABLE_ZEROED flag set then the filesystem is initialised and that's that - i.e. the method of initialisation stops being of any relevance.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Feb 19 at 17:20









        JonathanDITJonathanDIT

        1




        1






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f341015%2fhow-to-know-if-ext4lazyinit-feature-is-enabled-in-your-kernel-or-not%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How to make a Squid Proxy server?

            Is this a new Fibonacci Identity?

            19世紀