linux/fs/nilfs2/ioctl.c
<<
" /spaon> /formn> a " href="../linux+v34.62/fs/nilfs2/ioctl.c">" img src="../.static/gfx/right.png" alt=">>">" /spaon>" spao class="lxr_search">" " input typue=hidden" namue=navtarget" value=">" input typue=text" namue=search" ide=search">" buttiontypue=submit">Search /formn> /spaon>" spao class="lxr_prefs"n> a href="+prefs?return=fs/nilfs2/ioctl.c"" onclick="return ajax_prefs();">" Prefs> /a>" /spaon> /divn> form acptio="ajax+*" method="post" onsubmit="return false;">" input typue=hidden" namue=ajax_lookup" ide=ajax_lookup" value=">" /formn>" div class="headingbottim"> div ide=search_results" class="search_results"> n> /divn> div ide=content">> div ide=file_contents"n
   1 /a> spao class="comment">/* /spaon>   2 /a> spao class="comment"> * ioctl.c - NILFS ioctl operaptios. /spaon>   3 /a> spao class="comment"> * /spaon>   4 /a> spao class="comment"> * Copyright (C) 2007, 2008 NippionTelegraph andnTelephone Corporaptio. /spaon>   5 /a> spao class="comment"> * /spaon>   6 /a> spao class="comment"> * This program is free software; you cao redistribute it and/or modify /spaon>   7 /a> spao class="comment"> * it under the terms of the GNU General Public License as published by /spaon>   8 /a> spao class="comment"> * the Free Software Foundaptio; either verstion2 of the License, or /spaon>   9 /a> spao class="comment"> * (at your /optio) any later verstio. /spaon>  .10 spao class="comment"> * /spaon>  11 /a> spao class="comment"> * This program is distributed in the hope that it will be useful, /spaon>  12 /a> spao class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of /spaon>  13 /a> spao class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the /spaon>  14 /a> spao class="comment"> * GNU General Public License for more details. /spaon>  15 /a> spao class="comment"> * /spaon>  16 /a> spao class="comment"> * You should have received a copy of the GNU General Public License /spaon>  17 /a> spao class="comment"> * along with this program; if not, write to the Free Software /spaon>  18 /a> spao class="comment"> * Foundaptio, Inc., 51 Franklin St, Fifth Floor, Bostio, MA  02110-1301  USA /spaon>  19 /a> spao class="comment"> * /spaon>  210 spao class="comment"> * Written by Koji Sato <koji@osrg.net>. /spaon>  21 /a> spao class="comment"> */ /spaon>  22 /a>>  23 /a>#include <linux/fs.h /a>>>  24 /a>#include <linux/wait.h /a>>>  25 /a>#include <linux/slab.h /a>>>  26 /a>#include <linux/capability.h /a>>    spao class="comment">/* capable() */ /spaon>  27 /a>#include <linux/uaccess.h /a>>       spao class="comment">/* copy_from_user(), copy_to_user() */ /spaon>  28 /a>#include <linux/vmalloc.h /a>>>  29 /a>#include <linux/compat.h /a>>        spao class="comment">/* compat_ptr() */ /spaon>  30 /a>#include <linux/mount.h /a>>         spao class="comment">/* mnt_want_write_file(), mnt_drop_write_file() */ /spaon>  31 /a>#include <linux/buffer_head.h /a>>>  32 /a>#include <linux/nilfs2_fs.h /a>>>  33 /a>#include "nilfs.h /a>">  34 /a>#include "segment.h /a>">  35 /a>#include "bmap.h /a>">  36 /a>#include "cpfile.h /a>">  37 /a>#include "sufile.h /a>">  38 /a>#include "dat.h /a>">  39 /a>>  40 /a>>  41 /a>static int  a href="+code=nilfs_ioctl_wrap_copy" class="sref">nilfs_ioctl_wrap_copy /a>(struct  a href="+code=the_nilfs" class="sref">the_nilfs /a> * a href="+code=nilfs" class="sref">nilfs /a>,>  42 /a>                                 struct  a href="+code=nilfs_argv" class="sref">nilfs_argv /a> * a href="+code=argv" class="sref">argv /a>, int  a href="+code=dir" class="sref">dir /a>,>  43 /a>                                  a href="+code=ssize_t" class="sref">ssize_t /a> (* a href="+code=dofunc" class="sref">dofunc /a>)(struct  a href="+code=the_nilfs" class="sref">the_nilfs /a> *,>  44 /a>                                                    a href="+code=__u64" class="sref">__u64 /a> *, int,>  45 /a>                                                   void *,  a href="+code=size_t" class="sref">size_t /a>,  a href="+code=size_t" class="sref">size_t /a>))>  46 /a>{>  47 /a>        void * a href="+code=buf" class="sref">buf /a>;>  48 /a>        void  a href="+code=__user" class="sref">__user /a> * a href="+code=base" class="sref">base /a> = (void  a href="+code=__user" class="sref">__user /a> *)(unsigned long) a href="+code=argv" class="sref">argv /a>-> a href="+code=v_base" class="sref">v_base /a>;>  49 /a>         a href="+code=size_t" class="sref">size_t /a>  a href="+code=maxmembs" class="sref">maxmembs /a>,  a href="+code=total" class="sref">total /a>,  a href="+code=n" class="sref">n /a>;>  50 /a>         a href="+code=ssize_t" class="sref">ssize_t /a>  a href="+code=nr" class="sref">nr /a>;>  51 /a>        int  a href="+code=ret" class="sref">ret /a>,  a href="+code=i" class="sref">i /a>;>  52 /a>         a href="+code=__u64" class="sref">__u64 /a>  a href="+code=pos" class="sref">pos /a>,  a href="+code=ppos" class="sref">ppos /a>;>  53 /a>>  54 /a>        if ( a href="+code=argv" class="sref">argv /a>-> a href="+code=v_nmembs" class="sref">v_nmembs /a> == 0)>  55 /a>                return 0;>  56 /a>>  57 /a>        if ( a href="+code=argv" class="sref">argv /a>-> a href="+code=v_size" class="sref">v_size /a> >  a href="+code=PAGE_SIZE" class="sref">PAGE_SIZE /a>)>  58 /a>                return - a href="+code=EINVAL" class="sref">EINVAL /a>;>  59 /a>>  60 /a>         a href="+code=buf" class="sref">buf /a> = (void *) a href="+code=__get_free_pages" class="sref">__get_free_pages /a>( a href="+code=GFP_NOFS" class="sref">GFP_NOFS /a>, 0);>  61 /a>        if ( a href="+code=unlikely" class="sref">unlikely /a>(! a href="+code=buf" class="sref">buf /a>))>  62 /a>                return - a href="+code=ENOMEM" class="sref">ENOMEM /a>;>  63 /a>         a href="+code=maxmembs" class="sref">maxmembs /a> =  a href="+code=PAGE_SIZE" class="sref">PAGE_SIZE /a> /  a href="+code=argv" class="sref">argv /a>-> a href="+code=v_size" class="sref">v_size /a>;>  64 /a>>  65 /a>         a href="+code=ret" class="sref">ret /a> = 0;>  66 /a>         a href="+code=total" class="sref">total /a> = 0;>  67 /a>         a href="+code=pos" class="sref">pos /a> =  a href="+code=argv" class="sref">argv /a>-> a href="+code=v_index" class="sref">v_index /a>;>  68 /a>        for ( a href="+code=i" class="sref">i /a> = 0;  a href="+code=i" class="sref">i /a> <  a href="+code=argv" class="sref">argv /a>-> a href="+code=v_nmembs" class="sref">v_nmembs /a>;  a href="+code=i" class="sref">i /a> +=  a href="+code=n" class="sref">n /a>) {>  69 /a>                 a href="+code=n" class="sref">n /a> = ( a href="+code=argv" class="sref">argv /a>-> a href="+code=v_nmembs" class="sref">v_nmembs /a> -  a href="+code=i" class="sref">i /a> <  a href="+code=maxmembs" class="sref">maxmembs /a>) ?>  70 /a>                         a href="+code=argv" class="sref">argv /a>-> a href="+code=v_nmembs" class="sref">v_nmembs /a> -  a href="+code=i" class="sref">i /a> :  a href="+code=maxmembs" class="sref">maxmembs /a>;>  71 /a>                if (( a href="+code=dir" class="sref">dir /a> &  a href="+code=_IOC_WRITE" class="sref">_IOC_WRITE /a>) &&>  72 /a>                     a href="+code=copy_from_user" class="sref">copy_from_user /a>( a href="+code=buf" class="sref">buf /a>,  a href="+code=base" class="sref">base /a> +  a href="+code=argv" class="sref">argv /a>-> a href="+code=v_size" class="sref">v_size /a> *  a href="+code=i" class="sref">i /a>,>  73 /a>                                    a href="+code=argv" class="sref">argv /a>-> a href="+code=v_size" class="sref">v_size /a> *  a href="+code=n" class="sref">n /a>)) {>  74 /a>                         a href="+code=ret" class="sref">ret /a> = - a href="+code=EFAULT" class="sref">EFAULT /a>;>  75 /a>                        break;>  76 /a>                }>  77 /a>                 a href="+code=ppos" class="sref">ppos /a> =  a href="+code=pos" class="sref">pos /a>;>  78 /a>                 a href="+code=nr" class="sref">nr /a> =  a href="+code=dofunc" class="sref">dofunc /a>( a href="+code=nilfs" class="sref">nilfs /a>, & a href="+code=pos" class="sref">pos /a>,  a href="+code=argv" class="sref">argv /a>-> a href="+code=v_flags" class="sref">v_flags /a>,  a href="+code=buf" class="sref">buf /a>,  a href="+code=argv" class="sref">argv /a>-> a href="+code=v_size" class="sref">v_size /a>,>  79 /a>                                a href="+code=n" class="sref">n /a>);>  80 /a>                if ( a href="+code=nr" class="sref">nr /a> < 0) {>  81 /a>                         a href="+code=ret" class="sref">ret /a> =  a href="+code=nr" class="sref">nr /a>;>  82 /a>                        break;>  83 /a>                }>  84 /a>                if (( a href="+code=dir" class="sref">dir /a> &  a href="+code=_IOC_READ" class="sref">_IOC_READ /a>) &&>  85 /a>                     a href="+code=copy_to_user" class="sref">copy_to_user /a>( a href="+code=base" class="sref">base /a> +  a href="+code=argv" class="sref">argv /a>-> a href="+code=v_size" class="sref">v_size /a> *  a href="+code=i" class="sref">i /a>,  a href="+code=buf" class="sref">buf /a>,>  86 /a>                                  a href="+code=argv" class="sref">argv /a>-> a href="+code=v_size" class="sref">v_size /a> *  a href="+code=nr" class="sref">nr /a>)) {>  87 /a>                         a href="+code=ret" class="sref">ret /a> = - a href="+code=EFAULT" class="sref">EFAULT /a>;>  88 /a>                        break;>  89 /a>                }>  90 /a>                 a href="+code=total" class="sref">total /a> +=  a href="+code=nr" class="sref">nr /a>;>  91 /a>                if (( a href="+code=size_t" class="sref">size_t /a>) a href="+code=nr" class="sref">nr /a> <  a href="+code=n" class="sref">n /a>)>  92 /a>                        break;>  93 /a>                if ( a href="+code=pos" class="sref">pos /a> ==  a href="+code=ppos" class="sref">ppos /a>)>  94 /a>                         a href="+code=pos" class="sref">pos /a> +=  a href="+code=n" class="sref">n /a>;>  95 /a>        }>  96 /a>         a href="+code=argv" class="sref">argv /a>-> a href="+code=v_nmembs" class="sref">v_nmembs /a> =  a href="+code=total" class="sref">total /a>;>  97 /a>>  98 /a>         a href="+code=free_pages" class="sref">free_pages /a>((unsigned long) a href="+code=buf" class="sref">buf /a>, 0);>  99 /a>        return  a href="+code=ret" class="sref">ret /a>;> 100 /a>}> 101 /a>> 102 /a>static int  a href="+code=nilfs_ioctl_getflags" class="sref">nilfs_ioctl_getflags /a>(struct  a href="+code=inode" class="sref">inode /a> * a href="+code=inode" class="sref">inode /a>, void  a href="+code=__user" class="sref">__user /a> * a href="+code=argp" class="sref">argp /a>)> 103 /a>{> 104 /a>        unsigned int  a href="+code=flags" class="sref">flags /a> =  a href="+code=NILFS_I" class="sref">NILFS_I /a>( a href="+code=inode" class="sref">inode /a>)-> a href="+code=i_flags" class="sref">i_flags /a> &  a href="+code=FS_FL_USER_VISIBLE" class="sref">FS_FL_USER_VISIBLE /a>;> 105 /a>> 106 /a>        return  a href="+code=put_user" class="sref">put_user /a>( a href="+code=flags" class="sref">flags /a>, (int  a href="+code=__user" class="sref">__user /a> *) a href="+code=argp" class="sref">argp /a>);> 107 /a>}> 108 /a>> 109 /a>static int  a href="+code=nilfs_ioctl_setflags" class="sref">nilfs_ioctl_setflags /a>(struct  a href="+code=inode" class="sref">inode /a> * a href="+code=inode" class="sref">inode /a>, struct  a href="+code=file" class="sref">file /a> * a href="+code=filp" class="sref">filp /a>,> 110 /a>                                void  a href="+code=__user" class="sref">__user /a> * a href="+code=argp" class="sref">argp /a>)> 111 /a>{> 112 /a>        struct  a href="+code=nilfs_transacptio_info" class="sref">nilfs_transacptio_info /a>  a href="+code=ti" class="sref">ti /a>;> 113 /a>        unsigned int  a href="+code=flags" class="sref">flags /a>,  a href="+code=oldflags" class="sref">oldflags /a>;> 114 /a>        int  a href="+code=ret" class="sref">ret /a>;> 115 /a>> 116 /a>        if (! a href="+code=inode_owner_or_capable" class="sref">inode_owner_or_capable /a>( a href="+code=inode" class="sref">inode /a>))> 117 /a>                return - a href="+code=EACCES" class="sref">EACCES /a>;> 118 /a>> 119 /a>        if ( a href="+code=get_user" class="sref">get_user /a>( a href="+code=flags" class="sref">flags /a>, (int  a href="+code=__user" class="sref">__user /a> *) a href="+code=argp" class="sref">argp /a>))> 120 /a>                return - a href="+code=EFAULT" class="sref">EFAULT /a>;> 121 /a>> 122 /a>         a href="+code=ret" class="sref">ret /a> =  a href="+code=mnt_want_write_file" class="sref">mnt_want_write_file /a>( a href="+code=filp" class="sref">filp /a>);> 123 /a>        if ( a href="+code=ret" class="sref">ret /a>)> 124 /a>                return  a href="+code=ret" class="sref">ret /a>;> 125 /a>> 126 /a>         a href="+code=flags" class="sref">flags /a> =  a href="+code=nilfs_mask_flags" class="sref">nilfs_mask_flags /a>( a href="+code=inode" class="sref">inode /a>-> a href="+code=i_mode" class="sref">i_mode /a>,  a href="+code=flags" class="sref">flags /a>);> 127 /a>> 128 /a>         a href="+code=mutex_lock" class="sref">mutex_lock /a>(& a href="+code=inode" class="sref">inode /a>-> a href="+code=i_mutex" class="sref">i_mutex /a>);> 129 /a>> 130 /a>         a href="+code=oldflags" class="sref">oldflags /a> =  a href="+code=NILFS_I" class="sref">NILFS_I /a>( a href="+code=inode" class="sref">inode /a>)-> a href="+code=i_flags" class="sref">i_flags /a>;> 131 /a>> 132 /a>         spao class="comment">/* /spaon> 133 /a> spao class="comment">         * The IMMUTABLE andnAPPEND_ONLY flags cao only be changed by the /spaon> 134 /a> spao class="comment">         * relevant capability. /spaon> 135 /a> spao class="comment">         */ /spaon> 136 /a>         a href="+code=ret" class="sref">ret /a> = - a href="+code=EPERM" class="sref">EPERM /a>;> 137 /a>        if ((( a href="+code=flags" class="sref">flags /a> ^  a href="+code=oldflags" class="sref">oldflags /a>) & ( a href="+code=FS_APPEND_FL" class="sref">FS_APPEND_FL /a> |  a href="+code=FS_IMMUTABLE_FL" class="sref">FS_IMMUTABLE_FL /a>)) &&> 138 /a>            ! a href="+code=capable" class="sref">capable /a>( a href="+code=CAP_LINUX_IMMUTABLE" class="sref">CAP_LINUX_IMMUTABLE /a>))> 139 /a>                goto  a href="+code=out" class="sref">out /a>;> 140 /a>> 141 /a>         a href="+code=ret" class="sref">ret /a> =  a href="+code=nilfs_transacptio_begin" class="sref">nilfs_transacptio_begin /a>( a href="+code=inode" class="sref">inode /a>-> a href="+code=i_sb" class="sref">i_sb /a>, & a href="+code=ti" class="sref">ti /a>, 0);> 142 /a>        if ( a href="+code=ret" class="sref">ret /a>)> 143 /a>                goto  a href="+code=out" class="sref">out /a>;> 144 /a>> 145 /a>         a href="+code=NILFS_I" class="sref">NILFS_I /a>( a href="+code=inode" class="sref">inode /a>)-> a href="+code=i_flags" class="sref">i_flags /a> = ( a href="+code=oldflags" class="sref">oldflags /a> & ~ a href="+code=FS_FL_USER_MODIFIABLE" class="sref">FS_FL_USER_MODIFIABLE /a>) |> 146 /a>                ( a href="+code=flags" class="sref">flags /a> &  a href="+code=FS_FL_USER_MODIFIABLE" class="sref">FS_FL_USER_MODIFIABLE /a>);> 147 /a>> 148 /a>         a href="+code=nilfs_set_inode_flags" class="sref">nilfs_set_inode_flags /a>( a href="+code=inode" class="sref">inode /a>);> 149 /a>         a href="+code=inode" class="sref">inode /a>-> a href="+code=i_cptme" class="sref">i_cptme /a> =  a href="+code=CURRENT_TIME" class="sref">CURRENT_TIME /a>;> 150 /a>        if ( a href="+code=IS_SYNC" class="sref">IS_SYNC /a>( a href="+code=inode" class="sref">inode /a>))> 151 /a>                 a href="+code=nilfs_set_transacptio_flag" class="sref">nilfs_set_transacptio_flag /a>( a href="+code=NILFS_TI_SYNC" class="sref">NILFS_TI_SYNC /a>);> 152 /a>> 153 /a>         a href="+code=nilfs_mark_inode_dirty" class="sref">nilfs_mark_inode_dirty /a>( a href="+code=inode" class="sref">inode /a>);> 154 /a>         a href="+code=ret" class="sref">ret /a> =  a href="+code=nilfs_transacptio_commit" class="sref">nilfs_transacptio_commit /a>( a href="+code=inode" class="sref">inode /a>-> a href="+code=i_sb" class="sref">i_sb /a>);> 155 /a> a href="+code=out" class="sref">out /a>:> 156 /a>         a href="+code=mutex_unlock" class="sref">mutex_unlock /a>(& a href="+code=inode" class="sref">inode /a>-> a href="+code=i_mutex" class="sref">i_mutex /a>);> 157 /a>         a href="+code=mnt_drop_write_file" class="sref">mnt_drop_write_file /a>( a href="+code=filp" class="sref">filp /a>);> 158 /a>        return  a href="+code=ret" class="sref">ret /a>;> 159 /a>}> 160 /a>> 161 /a>static int  a href="+code=nilfs_ioctl_getverstio" class="sref">nilfs_ioctl_getverstio /a>(struct  a href="+code=inode" class="sref">inode /a> * a href="+code=inode" class="sref">inode /a>, void  a href="+code=__user" class="sref">__user /a> * a href="+code=argp" class="sref">argp /a>)> 162 /a>{> 163 /a>        return  a href="+code=put_user" class="sref">put_user /a>( a href="+code=inode" class="sref">inode /a>-> a href="+code=i_generattio" class="sref">i_generattio /a>, (int  a href="+code=__user" class="sref">__user /a> *) a href="+code=argp" class="sref">argp /a>);> 164 /a>}> 165 /a>> 166 /a>static int  a href="+code=nilfs_ioctl_change_cpmode" class="sref">nilfs_ioctl_change_cpmode /a>(struct  a href="+code=inode" class="sref">inode /a> * a href="+code=inode" class="sref">inode /a>, struct  a href="+code=file" class="sref">file /a> * a href="+code=filp" class="sref">filp /a>,> 167 /a>                                     unsigned int  a href="+code=cmd" class="sref">cmd /a>, void  a href="+code=__user" class="sref">__user /a> * a href="+code=argp" class="sref">argp /a>)> 168 /a>{> 169 /a>        struct  a href="+code=the_nilfs" class="sref">the_nilfs /a> * a href="+code=nilfs" class="sref">nilfs /a> =  a href="+code=inode" class="sref">inode /a>-> a href="+code=i_sb" class="sref">i_sb /a>-> a href="+code=s_fs_info" class="sref">s_fs_info /a>;> 170 /a>        struct  a href="+code=nilfs_transacptio_info" class="sref">nilfs_transacptio_info /a>  a href="+code=ti" class="sref">ti /a>;> 171 /a>        struct  a href="+code=nilfs_cpmode" class="sref">nilfs_cpmode /a>  a href="+code=cpmode" class="sref">cpmode /a>;> 172 /a>        int  a href="+code=ret" class="sref">ret /a>;> 173 /a>> 174 /a>        if (! a href="+code=capable" class="sref">capable /a>( a href="+code=CAP_SYS_ADMIN" class="sref">CAP_SYS_ADMIN /a>))> 175 /a>                return - a href="+code=EPERM" class="sref">EPERM /a>;> 176 /a>> 177 /a>         a href="+code=ret" class="sref">ret /a> =  a href="+code=mnt_want_write_file" class="sref">mnt_want_write_file /a>( a href="+code=filp" class="sref">filp /a>);> 178 /a>        if ( a href="+code=ret" class="sref">ret /a>)> 179 /a>                return  a href="+code=ret" class="sref">ret /a>;> 180 /a>> 181 /a>         a href="+code=ret" class="sref">ret /a> = - a href="+code=EFAULT" class="sref">EFAULT /a>;> 182 /a>        if ( a href="+code=copy_from_user" class="sref">copy_from_user /a>(& a href="+code=cpmode" class="sref">cpmode /a>,  a href="+code=argp" class="sref">argp /a>, sizeof( a href="+code=cpmode" class="sref">cpmode /a>)))> 183 /a>                goto  a href="+code=out" class="sref">out /a>;> 184 /a>> 185 /a>         a href="+code=mutex_lock" class="sref">mutex_lock /a>(& a href="+code=nilfs" class="sref">nilfs /a>-> a href="+code=ns_snapshot_mount_mutex" class="sref">ns_snapshot_mount_mutex /a>);> 186 /a>> 187 /a>         a href="+code=nilfs_transacptio_begin" class="sref">nilfs_transacptio_begin /a>( a href="+code=inode" class="sref">inode /a>-> a href="+code=i_sb" class="sref">i_sb /a>, & a href="+code=ti" class="sref">ti /a>, 0);> 188 /a>         a href="+code=ret" class="sref">ret /a> =  a href="+code=nilfs_cpfile_change_cpmode" class="sref">nilfs_cpfile_change_cpmode /a>(> 189 /a>                 a href="+code=nilfs" class="sref">nilfs /a>-> a href="+code=ns_cpfile" class="sref">ns_cpfile /a>,  a href="+code=cpmode" class="sref">cpmode /a>. a href="+code=cm_cno" class="sref">cm_cno /a>,  a href="+code=cpmode" class="sref">cpmode /a>. a href="+code=cm_mode" class="sref">cm_mode /a>);> 190 /a>        if ( a href="+code=unlikely" class="sref">unlikely /a>( a href="+code=ret" class="sref">ret /a> < 0))> 191 /a>                 a href="+code=nilfs_transacptio_abort" class="sref">nilfs_transacptio_abort /a>( a href="+code=inode" class="sref">inode /a>-> a href="+code=i_sb" class="sref">i_sb /a>);> 192 /a>        else> 193 /a>                 a href="+code=nilfs_transacptio_commit" class="sref">nilfs_transacptio_commit /a>( a href="+code=inode" class="sref">inode /a>-> a href="+code=i_sb" class="sref">i_sb /a>);  spao class="comment">/* never fails */ /spaon> 194 /a>> 195 /a>         a href="+code=mutex_unlock" class="sref">mutex_unlock /a>(& a href="+code=nilfs" class="sref">nilfs /a>-> a href="+code=ns_snapshot_mount_mutex" class="sref">ns_snapshot_mount_mutex /a>);> 196 /a> a href="+code=out" class="sref">out /a>:> 197 /a>         a href="+code=mnt_drop_write_file" class="sref">mnt_drop_write_file /a>( a href="+code=filp" class="sref">filp /a>);> 198 /a>        return  a href="+code=ret" class="sref">ret /a>;> 199 /a>}> 200 /a>> 201 /a>static int> 202 /a> a href="+code=nilfs_ioctl_delete_checkpoint" class="sref">nilfs_ioctl_delete_checkpoint /a>(struct  a href="+code=inode" class="sref">inode /a> * a href="+code=inode" class="sref">inode /a>, struct  a href="+code=file" class="sref">file /a> * a href="+code=filp" class="sref">filp /a>,> 203 /a>                              unsigned int  a href="+code=cmd" class="sref">cmd /a>, void  a href="+code=__user" class="sref">__user /a> * a href="+code=argp" class="sref">argp /a>)> 204 /a>{> 205 /a>        struct  a href="+code=the_nilfs" class="sref">the_nilfs /a> * a href="+code=nilfs" class="sref">nilfs /a> =  a href="+code=inode" class="sref">inode /a>-> a href="+code=i_sb" class="sref">i_sb /a>-> a href="+code=s_fs_info" class="sref">s_fs_info /a>;> 206 /a>        struct  a href="+code=nilfs_transacptio_info" class="sref">nilfs_transacptio_info /a>  a href="+code=ti" class="sref">ti /a>;> 207 /a>         a href="+code=__u64" class="sref">__u64 /a>  a href="+code=cno" class="sref">cno /a>;> 208 /a>        int  a href="+code=ret" class="sref">ret /a>;> 209 /a>> 210 /a>        if (! a href="+code=capable" class="sref">capable /a>( a href="+code=CAP_SYS_ADMIN" class="sref">CAP_SYS_ADMIN /a>))> 211 /a>                return - a href="+code=EPERM" class="sref">EPERM /a>;> 212 /a>> 213 /a>         a href="+code=ret" class="sref">ret /a> =  a href="+code=mnt_want_write_file" class="sref">mnt_want_write_file /a>( a href="+code=filp" class="sref">filp /a>);> 214 /a>        if ( a href="+code=ret" class="sref">ret /a>)> 215 /a>                return  a href="+code=ret" class="sref">ret /a>;> 216 /a>> 217 /a>         a href="+code=ret" class="sref">ret /a> = - a href="+code=EFAULT" class="sref">EFAULT /a>;> 218 /a>        if ( a href="+code=copy_from_user" class="sref">copy_from_user /a>(& a href="+code=cno" class="sref">cno /a>,  a href="+code=argp" class="sref">argp /a>, sizeof( a href="+code=cno" class="sref">cno /a>)))> 219 /a>                goto  a href="+code=out" class="sref">out /a>;> 220 /a>> 221 /a>         a href="+code=nilfs_transacptio_begin" class="sref">nilfs_transacptio_begin /a>( a href="+code=inode" class="sref">inode /a>-> a href="+code=i_sb" class="sref">i_sb /a>, & a href="+code=ti" class="sref">ti /a>, 0);> 222 /a>         a href="+code=ret" class="sref">ret /a> =  a href="+code=nilfs_cpfile_delete_checkpoint" class="sref">nilfs_cpfile_delete_checkpoint /a>( a href="+code=nilfs" class="sref">nilfs /a>-> a href="+code=ns_cpfile" class="sref">ns_cpfile /a>,  a href="+code=cno" class="sref">cno /a>);> 223 /a>        if ( a href="+code=unlikely" class="sref">unlikely /a>( a href="+code=ret" class="sref">ret /a> < 0))> 224 /a>                 a href="+code=nilfs_transacptio_abort" class="sref">nilfs_transacptio_abort /a>( a href="+code=inode" class="sref">inode /a>-> a href="+code=i_sb" class="sref">i_sb /a>);> 225 /a>        else> 226 /a>                 a href="+code=nilfs_transacptio_commit" class="sref">nilfs_transacptio_commit /a>( a href="+code=inode" class="sref">inode /a>-> a href="+code=i_sb" class="sref">i_sb /a>);  spao class="comment">/* never fails */ /spaon> 227 /a> a href="+code=out" class="sref">out /a>:> 228 /a>         a href="+code=mnt_drop_write_file" class="sref">mnt_drop_write_file /a>( a href="+code=filp" class="sref">filp /a>);> 229 /a>        return  a href="+code=ret" class="sref">ret /a>;> 230 /a>}> 231 /a>> 232 /a>static  a href="+code=ssize_t" class="sref">ssize_t /a>> 233 /a> a href="+code=nilfs_ioctl_do_get_cpinfo" class="sref">nilfs_ioctl_do_get_cpinfo /a>(struct  a href="+code=the_nilfs" class="sref">the_nilfs /a> * a href="+code=nilfs" class="sref">nilfs /a>,  a href="+code=__u64" class="sref">__u64 /a> * a href="+code=posp" class="sref">posp /a>, int  a href="+code=flags" class="sref">flags /a>,> 234 /a>                          void * a href="+code=buf" class="sref">buf /a>,  a href="+code=size_t" class="sref">size_t /a>  a href="+code=size" class="sref">size /a>,  a href="+code=size_t" class="sref">size_t /a>  a href="+code=nmembs" class="sref">nmembs /a>)> 235 /a>{> 236 /a>        int  a href="+code=ret" class="sref">ret /a>;> 237 /a>> 238 /a>         a href="+code=down_read" class="sref">down_read /a>(& a href="+code=nilfs" class="sref">nilfs /a>-> a href="+code=ns_segctor_sem" class="sref">ns_segctor_sem /a>);> 239 /a>         a href="+code=ret" class="sref">ret /a> =  a href="+code=nilfs_cpfile_get_cpinfo" class="sref">nilfs_cpfile_get_cpinfo /a>( a href="+code=nilfs" class="sref">nilfs /a>-> a href="+code=ns_cpfile" class="sref">ns_cpfile /a>,  a href="+code=posp" class="sref">posp /a>,  a href="+code=flags" class="sref">flags /a>,  a href="+code=buf" class="sref">buf /a>,> 240 /a>                                       a href="+code=size" class="sref">size /a>,  a href="+code=nmembs" class="sref">nmembs /a>);> 241 /a>         a href="+code=up_read" class="sref">up_read /a>(& a href="+code=nilfs" class="sref">nilfs /a>-> a href="+code=ns_segctor_sem" class="sref">ns_segctor_sem /a>);> 242 /a>        return  a href="+code=ret" class="sref">ret /a>;> 243 /a>}> 244 /a>> 245 /a>static int  a href="+code=nilfs_ioctl_get_cpstat" class="sref">nilfs_ioctl_get_cpstat /a>(struct  a href="+code=inode" class="sref">inode /a> * a href="+code=inode" class="sref">inode /a>, struct  a href="+code=file" class="sref">file /a> * a href="+code=filp" class="sref">filp /a>,> 246 /a>                                  unsigned int  a href="+code=cmd" class="sref">cmd /a>, void  a href="+code=__user" class="sref">__user /a> * a href="+code=argp" class="sref">argp /a>)> 247 /a>{> 248 /a>        struct  a href="+code=the_nilfs" class="sref">the_nilfs /a> * a href="+code=nilfs" class="sref">nilfs /a> =  a href="+code=inode" class="sref">inode /a>-> a href="+code=i_sb" class="sref">i_sb /a>-> a href="+code=s_fs_info" class="sref">s_fs_info /a>;> 249 /a>        struct  a href="+code=nilfs_cpstat" class="sref">nilfs_cpstat /a>  a href="+code=cpstat" class="sref">cpstat /a>;> 250 /a>        int  a href="+code=ret" class="sref">ret /a>;> 251 /a>> 252 /a>         a href="+code=down_read" class="sref">down_read /a>(& a href="+code=nilfs" class="sref">nilfs /a>-> a href="+code=ns_segctor_sem" class="sref">ns_segctor_sem /a>);> 253 /a>         a href="+code=ret" class="sref">ret /a> =  a href="+code=nilfs_cpfile_get_stat" class="sref">nilfs_cpfile_get_stat /a>( a href="+code=nilfs" class="sref">nilfs /a>-> a href="+code=ns_cpfile" class="sref">ns_cpfile /a>, & a href="+code=cpstat" class="sref">cpstat /a>);> 254 /a>         a href="+code=up_read" class="sref">up_read /a>(& a href="+code=nilfs" class="sref">nilfs /a>-> a href="+code=ns_segctor_sem" class="sref">ns_segctor_sem /a>);> 255 /a>        if ( a href="+code=ret" class="sref">ret /a> < 0)> 256 /a>                return  a href="+code=ret" class="sref">ret /a>;> 257 /a>> 258 /a>        if ( a href="+code=copy_to_user" class="sref">copy_to_user /a>( a href="+code=argp" class="sref">argp /a>, & a href="+code=cpstat" class="sref">cpstat /a>, sizeof( a href="+code=cpstat" class="sref">cpstat /a>)))> 259 /a>                 a href="+code=ret" class="sref">ret /a> = - a href="+code=EFAULT" class="sref">EFAULT /a>;> 260 /a>        return  a href="+code=ret" class="sref">ret /a>;> 261 /a>}> 262 /a>> 263 /a>static  a href="+code=ssize_t" class="sref">ssize_t /a>> 264 /a> a href="+code=nilfs_ioctl_do_get_suinfo" class="sref">nilfs_ioctl_do_get_suinfo /a>(struct  a href="+code=the_nilfs" class="sref">the_nilfs /a> * a href="+code=nilfs" class="sref">nilfs /a>,  a href="+code=__u64" class="sref">__u64 /a> * a href="+code=posp" class="sref">posp /a>, int  a href="+code=flags" class="sref">flags /a>,> 265 /a>                          void * a href="+code=buf" class="sref">buf /a>,  a href="+code=size_t" class="sref">size_t /a>  a href="+code=size" class="sref">size /a>,  a href="+code=size_t" class="sref">size_t /a>  a href="+code=nmembs" class="sref">nmembs /a>)> 266 /a>{> 267 /a>        int  a href="+code=ret" class="sref">ret /a>;> 268 /a>> 269 /a>         a href="+code=down_read" class="sref">down_read /a>(& a href="+code=nilfs" class="sref">nilfs /a>-> a href="+code=ns_segctor_sem" class="sref">ns_segctor_sem /a>);> 270 /a>         a href="+code=ret" class="sref">ret /a> =  a href="+code=nilfs_sufile_get_suinfo" class="sref">nilfs_sufile_get_suinfo /a>( a href="+code=nilfs" class="sref">nilfs /a>-> a href="+code=ns_sufile" class="sref">ns_sufile /a>, * a href="+code=posp" class="sref">posp /a>,  a href="+code=buf" class="sref">buf /a>,  a href="+code=size" class="sref">size /a>,> 271 /a>                                       a href="+code=nmembs" class="sref">nmembs /a>);> 272 /a>         a href="+code=up_read" class="sref">up_read /a>(& a href="+code=nilfs" class="sref">nilfs /a>-> a href="+code=ns_segctor_sem" class="sref">ns_segctor_sem /a>);> 273 /a>        return  a href="+code=ret" class="sref">ret /a>;> 274 /a>}> 275 /a>> 276 /a>static int  a href="+code=nilfs_ioctl_get_sustat" class="sref">nilfs_ioctl_get_sustat /a>(struct  a href="+code=inode" class="sref">inode /a> * a href="+code=inode" class="sref">inode /a>, struct  a href="+code=file" class="sref">file /a> * a href="+code=filp" class="sref">filp /a>,> 277 /a>                                  unsigned int  a href="+code=cmd" class="sref">cmd /a>, void  a href="+code=__user" class="sref">__user /a> * a href="+code=argp" class="sref">argp /a>)> 278 /a>{> 279 /a>        struct  a href="+code=the_nilfs" class="sref">the_nilfs /a> * a href="+code=nilfs" class="sref">nilfs /a> =  a href="+code=inode" class="sref">inode /a>-> a href="+code=i_sb" class="sref">i_sb /a>-> a href="+code=s_fs_info" class="sref">s_fs_info /a>;> 280 /a>        struct  a href="+code=nilfs_sustat" class="sref">nilfs_sustat /a>  a href="+code=sustat" class="sref">sustat /a>;> 281 /a>        int  a href="+code=ret" class="sref">ret /a>;> 282 /a>> 283 /a>         a href="+code=down_read" class="sref">down_read /a>(& a href="+code=nilfs" class="sref">nilfs /a>-> a href="+code=ns_segctor_sem" class="sref">ns_segctor_sem /a>);> 284 /a>         a href="+code=ret" class="sref">ret /a> =  a href="+code=nilfs_sufile_get_stat" class="sref">nilfs_sufile_get_stat /a>( a href="+code=nilfs" class="sref">nilfs /a>-> a href="+code=ns_sufile" class="sref">ns_sufile /a>, & a href="+code=sustat" class="sref">sustat /a>);> 285 /a>         a href="+code=up_read" class="sref">up_read /a>(& a href="+code=nilfs" class="sref">nilfs /a>-> a href="+code=ns_segctor_sem" class="sref">ns_segctor_sem /a>);> 286 /a>        if ( a href="+code=ret" class="sref">ret /a> < 0)> 287 /a>                return  a href="+code=ret" class="sref">ret /a>;> 288 /a>> 289 /a>        if ( a href="+code=copy_to_user" class="sref">copy_to_user /a>( a href="+code=argp" class="sref">argp /a>, & a href="+code=sustat" class="sref">sustat /a>, sizeof( a href="+code=sustat" class="sref">sustat /a>)))> 290 /a>                 a href="+code=ret" class="sref">ret /a> = - a href="+code=EFAULT" class="sref">EFAULT /a>;> 291 /a>        return  a href="+code=ret" class="sref">ret /a>;> 292 /a>}> 293 /a>> 294 /a>static  a href="+code=ssize_t" class="sref">ssize_t /a>> 295 /a> a href="+code=nilfs_ioctl_do_get_vinfo" class="sref">nilfs_ioctl_do_get_vinfo /a>(struct  a href="+code=the_nilfs" class="sref">the_nilfs /a> * a href="+code=nilfs" class="sref">nilfs /a>,  a href="+code=__u64" class="sref">__u64 /a> * a href="+code=posp" class="sref">posp /a>, int  a href="+code=flags" class="sref">flags /a>,> 296 /a>                         void * a href="+code=buf" class="sref">buf /a>,  a href="+code=size_t" class="sref">size_t /a>  a href="+code=size" class="sref">size /a>,  a href="+code=size_t" class="sref">size_t /a>  a href="+code=nmembs" class="sref">nmembs /a>)> 297 /a>{> 298 /a>        int  a href="+code=ret" class="sref">ret /a>;> 299 /a>> 300 /a>         a href="+code=down_read" class="sref">down_read /a>(& a href="+code=nilfs" class="sref">nilfs /a>-> a href="+code=ns_segctor_sem" class="sref">ns_segctor_sem /a>);> 301 /a>         a href="+code=ret" class="sref">ret /a> =  a href="+code=nilfs_dat_get_vinfo" class="sref">nilfs_dat_get_vinfo /a>( a href="+code=nilfs" class="sref">nilfs /a>-> a href="+code=ns_dat" class="sref">ns_dat /a>,  a href="+code=buf" class="sref">buf /a>,  a href="+code=size" class="sref">size /a>,  a href="+code=nmembs" class="sref">nmembs /a>);> 302 /a>         a href="+code=up_read" class="sref">up_read /a>(& a href="+code=nilfs" class="sref">nilfs /a>-> a href="+code=ns_segctor_sem" class="sref">ns_segctor_sem /a>);> 303 /a>        return  a href="+code=ret" class="sref">ret /a>;> 304 /a>}> 305 /a>> 306 /a>static  a href="+code=ssize_t" class="sref">ssize_t /a>> 307 /a> a href="+code=nilfs_ioctl_do_get_bdescs" class="sref">nilfs_ioctl_do_get_bdescs /a>(struct  a href="+code=the_nilfs" class="sref">the_nilfs /a> * a href="+code=nilfs" class="sref">nilfs /a>,  a href="+code=__u64" class="sref">__u64 /a> * a href="+code=posp" class="sref">posp /a>, int  a href="+code=flags" class="sref">flags /a>,> 308 /a>                          void * a href="+code=buf" class="sref">buf /a>,  a href="+code=size_t" class="sref">size_t /a>  a href="+code=size" class="sref">size /a>,  a href="+code=size_t" class="sref">size_t /a>  a href="+code=nmembs" class="sref">nmembs /a>)> 309 /a>{> 310 /a>        struct  a href="+code=nilfs_bmap" class="sref">nilfs_bmap /a> * a href="+code=bmap" class="sref">bmap /a> =  a href="+code=NILFS_I" class="sref">NILFS_I /a>( a href="+code=nilfs" class="sref">nilfs /a>-> a href="+code=ns_dat" class="sref">ns_dat /a>)-> a href="+code=i_bmap" class="sref">i_bmap /a>;> 311 /a>        struct  a href="+code=nilfs_bdesc" class="sref">nilfs_bdesc /a> * a href="+code=bdescs" class="sref">bdescs /a> =  a href="+code=buf" class="sref">buf /a>;> 312 /a>        int  a href="+code=ret" class="sref">ret /a>,  a href="+code=i" class="sref">i /a>;> 313 /a>> 314 /a>         a href="+code=down_read" class="sref">down_read /a>(& a href="+code=nilfs" class="sref">nilfs /a>-> a href="+code=ns_segctor_sem" class="sref">ns_segctor_sem /a>);> 315 /a>        for ( a href="+code=i" class="sref">i /a> = 0;  a href="+code=i" class="sref">i /a> <  a href="+code=nmembs" class="sref">nmembs /a>;  a href="+code=i" class="sref">i /a>++) {> 316 /a>                 a href="+code=ret" class="sref">ret /a> =  a href="+code=nilfs_bmap_lookup_at_level" class="sref">nilfs_bmap_lookup_at_level /a>( a href="+code=bmap" class="sref">bmap /a>,> 317 /a>                                                  a href="+code=bdescs" class="sref">bdescs /a>[ a href="+code=i" class="sref">i /a>]. a href="+code=bd_offset" class="sref">bd_offset /a>,> 318 /a>                                                  a href="+code=bdescs" class="sref">bdescs /a>[ a href="+code=i" class="sref">i /a>]. a href="+code=bd_level" class="sref">bd_level /a> + 1,> 319 /a>                                                 & a href="+code=bdescs" class="sref">bdescs /a>[ a href="+code=i" class="sref">i /a>]. a href="+code=bd_blocknr" class="sref">bd_blocknr /a>);> 320 /a>                if ( a href="+code=ret" class="sref">ret /a> < 0) {> 321 /a>                        if ( a href="+code=ret" class="sref">ret /a> != - a href="+code=ENOENT" class="sref">ENOENT /a>) {> 322 /a>                                 a href="+code=up_read" class="sref">up_read /a>(& a href="+code=nilfs" class="sref">nilfs /a>-> a href="+code=ns_segctor_sem" class="sref">ns_segctor_sem /a>);> 323 /a>                                return  a href="+code=ret" class="sref">ret /a>;> 324 /a>                        }> 325 /a>                         a href="+code=bdescs" class="sref">bdescs /a>[ a href="+code=i" class="sref">i /a>]. a href="+code=bd_blocknr" class="sref">bd_blocknr /a> = 0;> 326 /a>                }> 327 /a>        }> 328 /a>         a href="+code=up_read" class="sref">up_read /a>(& a href="+code=nilfs" class="sref">nilfs /a>-> a href="+code=ns_segctor_sem" class="sref">ns_segctor_sem /a>);> 329 /a>        return  a href="+code=nmembs" class="sref">nmembs /a>;> 330 /a>}> 331 /a>> 332 /a>static int  a href="+code=nilfs_ioctl_get_bdescs" class="sref">nilfs_ioctl_get_bdescs /a>(struct  a href="+code=inode" class="sref">inode /a> * a href="+code=inode" class="sref">inode /a>, struct  a href="+code=file" class="sref">file /a> * a href="+code=filp" class="sref">filp /a>,> 333 /a>                                  unsigned int  a href="+code=cmd" class="sref">cmd /a>, void  a href="+code=__user" class="sref">__user /a> * a href="+code=argp" class="sref">argp /a>)> 334 /a>{> 335 /a>        struct  a href="+code=the_nilfs" class="sref">the_nilfs /a> * a href="+code=nilfs" class="sref">nilfs /a> =  a href="+code=inode" class="sref">inode /a>-> a href="+code=i_sb" class="sref">i_sb /a>-> a href="+code=s_fs_info" class="sref">s_fs_info /a>;> 336 /a>        struct  a href="+code=nilfs_argv" class="sref">nilfs_argv /a>  a href="+code=argv" class="sref">argv /a>;> 337 /a>        int  a href="+code=ret" class="sref">ret /a>;> 338 /a>> 339 /a>        if ( a href="+code=copy_from_user" class="sref">copy_from_user /a>(& a href="+code=argv" class="sref">argv /a>,  a href="+code=argp" class="sref">argp /a>, sizeof( a href="+code=argv" class="sref">argv /a>)))> 340 /a>                return - a href="+code=EFAULT" class="sref">EFAULT /a>;> 341 /a>> 342 /a>        if ( a href="+code=argv" class="sref">argv /a>. a href="+code=v_size" class="sref">v_size /a> != sizeof(struct  a href="+code=nilfs_bdesc" class="sref">nilfs_bdesc /a>))> 343 /a>                return - a href="+code=EINVAL" class="sref">EINVAL /a>;> 344 /a>> 345 /a>         a href="+code=ret" class="sref">ret /a> =  a href="+code=nilfs_ioctl_wrap_copy" class="sref">nilfs_ioctl_wrap_copy /a>( a href="+code=nilfs" class="sref">nilfs /a>, & a href="+code=argv" class="sref">argv /a>,  a href="+code=_IOC_DIR" class="sref">_IOC_DIR /a>( a href="+code=cmd" class="sref">cmd /a>),> 346 /a>                                     a href="+code=nilfs_ioctl_do_get_bdescs" class="sref">nilfs_ioctl_do_get_bdescs /a>);> 347 /a>        if ( a href="+code=ret" class="sref">ret /a> < 0)> 348 /a>                return  a href="+code=ret" class="sref">ret /a>;> 349 /a>> 350 /a>        if ( a href="+code=copy_to_user" class="sref">copy_to_user /a>( a href="+code=argp" class="sref">argp /a>, & a href="+code=argv" class="sref">argv /a>, sizeof( a href="+code=argv" class="sref">argv /a>)))> 351 /a>                 a href="+code=ret" class="sref">ret /a> = - a href="+code=EFAULT" class="sref">EFAULT /a>;> 352 /a>        return  a href="+code=ret" class="sref">ret /a>;> 353 /a>}> 354 /a>> 355 /a>static int  a href="+code=nilfs_ioctl_move_inode_block" class="sref">nilfs_ioctl_move_inode_block /a>(struct  a href="+code=inode" class="sref">inode /a> * a href="+code=inode" class="sref">inode /a>,> 356 /a>                                        struct  a href="+code=nilfs_vdesc" class="sref">nilfs_vdesc /a> * a href="+code=vdesc" class="sref">vdesc /a>,> 357 /a>                                        struct  a href="+code=list_head" class="sref">list_head /a> * a href="+code=buffers" class="sref">buffers /a>)> 358 /a>{> 359 /a>        struct  a href="+code=buffer_head" class="sref">buffer_head /a> * a href="+code=bh" class="sref">bh /a>;> 360 /a>        int  a href="+code=ret" class="sref">ret /a>;> 361 /a>> 362 /a>        if ( a href="+code=vdesc" class="sref">vdesc /a>-> a href="+code=vd_flags" class="sref">vd_flags /a> == 0)> 363 /a>                 a href="+code=ret" class="sref">ret /a> =  a href="+code=nilfs_gccache_submit_read_data" class="sref">nilfs_gccache_submit_read_data /a>(> 364 /a>                         a href="+code=inode" class="sref">inode /a>,  a href="+code=vdesc" class="sref">vdesc /a>-> a href="+code=vd_offset" class="sref">vd_offset /a>,  a href="+code=vdesc" class="sref">vdesc /a>-> a href="+code=vd_blocknr" class="sref">vd_blocknr /a>,> 365 /a>                         a href="+code=vdesc" class="sref">vdesc /a>-> a href="+code=vd_vblocknr" class="sref">vd_vblocknr /a>, & a href="+code=bh" class="sref">bh /a>);> 366 /a>        else> 367 /a>                 a href="+code=ret" class="sref">ret /a> =  a href="+code=nilfs_gccache_submit_read_node" class="sref">nilfs_gccache_submit_read_node /a>(> 368 /a>                         a href="+code=inode" class="sref">inode /a>,  a href="+code=vdesc" class="sref">vdesc /a>-> a href="+code=vd_blocknr" class="sref">vd_blocknr /a>,  a href="+code=vdesc" class="sref">vdesc /a>-> a href="+code=vd_vblocknr" class="sref">vd_vblocknr /a>, & a href="+code=bh" class="sref">bh /a>);> 369 /a>> 370 /a>        if ( a href="+code=unlikely" class="sref">unlikely /a>( a href="+code=ret" class="sref">ret /a> < 0)) {> 371 /a>                if ( a href="+code=ret" class="sref">ret /a> == - a href="+code=ENOENT" class="sref">ENOENT /a>)> 372 /a>                         a href="+code=printk" class="sref">printk /a>( a href="+code=KERN_CRIT" class="sref">KERN_CRIT /a>> 373 /a>                                spao class="string">"%s: invalid virtual block address (%s): " /spaon> 374 /a>                                spao class="string">"ino=%llu, cno=%llu, offset=%llu, " /spaon> 375 /a>                                spao class="string">"blocknr=%llu, vblocknr=%llu\n" /spaon,> 376 /a>                                a href="+code=__func__" class="sref">__func__ /a>,  a href="+code=vdesc" class="sref">vdesc /a>-> a href="+code=vd_flags" class="sref">vd_flags /a> ?  spao class="string">"node" /spaon :  spao class="string">"data" /spaon,> 377 /a>                               (unsigned long long) a href="+code=vdesc" class="sref">vdesc /a>-> a href="+code=vd_ino" class="sref">vd_ino /a>,> 378 /a>                               (unsigned long long) a href="+code=vdesc" class="sref">vdesc /a>-> a href="+code=vd_cno" class="sref">vd_cno /a>,> 379 /a>                               (unsigned long long) a href="+code=vdesc" class="sref">vdesc /a>-> a href="+code=vd_offset" class="sref">vd_offset /a>,> 380 /a>                               (unsigned long long) a href="+code=vdesc" class="sref">vdesc /a>-> a href="+code=vd_blocknr" class="sref">vd_blocknr /a>,> 381 /a>                               (unsigned long long) a href="+code=vdesc" class="sref">vdesc /a>-> a href="+code=vd_vblocknr" class="sref">vd_vblocknr /a>);> 382 /a>                return  a href="+code=ret" class="sref">ret /a>;> 383 /a>        }> 384 /a>        if ( a href="+code=unlikely" class="sref">unlikely /a>(! a href="+code=list_empty" class="sref">list_empty /a>(& a href="+code=bh" class="sref">bh /a>-> a href="+code=b_assoc_buffers" class="sref">b_assoc_buffers /a>))) {> 385 /a>                 a href="+code=printk" class="sref">printk /a>( a href="+code=KERN_CRIT" class="sref">KERN_CRIT /a>  spao class="string">"%s: conflicting %s buffer: ino=%llu, " /spaon> 386 /a>                        spao class="string">"cno=%llu, offset=%llu, blocknr=%llu, vblocknr=%llu\n" /spaon,> 387 /a>                        a href="+code=__func__" class="sref">__func__ /a>,  a href="+code=vdesc" class="sref">vdesc /a>-> a href="+code=vd_flags" class="sref">vd_flags /a> ?  spao class="string">"node" /spaon :  spao class="string">"data" /spaon,> 388 /a>                       (unsigned long long) a href="+code=vdesc" class="sref">vdesc /a>-> a href="+code=vd_ino" class="sref">vd_ino /a>,> 389 /a>                       (unsigned long long) a href="+code=vdesc" class="sref">vdesc /a>-> a href="+code=vd_cno" class="sref">vd_cno /a>,> 390 /a>                       (unsigned long long) a href="+code=vdesc" class="sref">vdesc /a>-> a href="+code=vd_offset" class="sref">vd_offset /a>,> 391 /a>                       (unsigned long long) a href="+code=vdesc" class="sref">vdesc /a>-> a href="+code=vd_blocknr" class="sref">vd_blocknr /a>,> 392 /a>                       (unsigned long long) a href="+code=vdesc" class="sref">vdesc /a>-> a href="+code=vd_vblocknr" class="sref">vd_vblocknr /a>);> 393 /a>                 a href="+code=brelse" class="sref">brelse /a>( a href="+code=bh" class="sref">bh /a>);> 394 /a>                return - a href="+code=EEXIST" class="sref">EEXIST /a>;> 395 /a>        }> 396 /a>         a href="+code=list_add_tail" class="sref">list_add_tail /a>(& a href="+code=bh" class="sref">bh /a>-> a href="+code=b_assoc_buffers" class="sref">b_assoc_buffers /a>,  a href="+code=buffers" class="sref">buffers /a>);> 397 /a>        return 0;> 398 /a>}> 399 /a>> 400 /a>static int  a href="+code=nilfs_ioctl_move_blocks" class="sref">nilfs_ioctl_move_blocks /a>(struct  a href="+code=super_block" class="sref">super_block /a> * a href="+code=sb" class="sref">sb /a>,> 401 /a>                                   struct  a href="+code=nilfs_argv" class="sref">nilfs_argv /a> * a href="+code=argv" class="sref">argv /a>, void * a href="+code=buf" class="sref">buf /a>)> 402 /a>{> 403 /a>         a href="+code=size_t" class="sref">size_t /a>  a href="+code=nmembs" class="sref">nmembs /a> =  a href="+code=argv" class="sref">argv /a>-> a href="+code=v_nmembs" class="sref">v_nmembs /a>;> 404 /a>        struct  a href="+code=the_nilfs" class="sref">the_nilfs /a> * a href="+code=nilfs" class="sref">nilfs /a> =  a href="+code=sb" class="sref">sb /a>-> a href="+code=s_fs_info" class="sref">s_fs_info /a>;> 405 /a>        struct  a href="+code=inode" class="sref">inode /a> * a href="+code=inode" class="sref">inode /a>;> 406 /a>        struct  a href="+code=nilfs_vdesc" class="sref">nilfs_vdesc /a> * a href="+code=vdesc" class="sref">vdesc /a>;> 407 /a>        struct  a href="+code=buffer_head" class="sref">buffer_head /a> * a href="+code=bh" class="sref">bh /a>, * a href="+code=n" class="sref">n /a>;> 408 /a>         a href="+code=LIST_HEAD" class="sref">LIST_HEAD /a>( a href="+code=buffers" class="sref">buffers /a>);> 409 /a>         a href="+code=ino_t" class="sref">ino_t /a>  a href="+code=ino" class="sref">ino /a>;> 410 /a>         a href="+code=__u64" class="sref">__u64 /a>  a href="+code=cno" class="sref">cno /a>;> 411 /a>        int  a href="+code=i" class="sref">i /a>,  a href="+code=ret" class="sref">ret /a>;> 412 /a>> 413 /a>        for ( a href="+code=i" class="sref">i /a> = 0,  a href="+code=vdesc" class="sref">vdesc /a> =  a href="+code=buf" class="sref">buf /a>;  a href="+code=i" class="sref">i /a> <  a href="+code=nmembs" class="sref">nmembs /a>; ) {> 414 /a>                 a href="+code=ino" class="sref">ino /a> =  a href="+code=vdesc" class="sref">vdesc /a>-> a href="+code=vd_ino" class="sref">vd_ino /a>;> 415 /a>                 a href="+code=cno" class="sref">cno /a> =  a href="+code=vdesc" class="sref">vdesc /a>-> a href="+code=vd_cno" class="sref">vd_cno /a>;> 416 /a>                 a href="+code=inode" class="sref">inode /a> =  a href="+code=nilfs_iget_for_gc" class="sref">nilfs_iget_for_gc /a>( a href="+code=sb" class="sref">sb /a>,  a href="+code=ino" class="sref">ino /a>,  a href="+code=cno" class="sref">cno /a>);> 417 /a>                if ( a href="+code=IS_ERR" class="sref">IS_ERR /a>( a href="+code=inode" class="sref">inode /a>)) {> 418 /a>                         a href="+code=ret" class="sref">ret /a> =  a href="+code=PTR_ERR" class="sref">PTR_ERR /a>( a href="+code=inode" class="sref">inode /a>);> 419 /a>                        goto  a href="+code=failed" class="sref">failed /a>;> 420 /a>                }> 421 /a>                if ( a href="+code=list_empty" class="sref">list_empty /a>(& a href="+code=NILFS_I" class="sref">NILFS_I /a>( a href="+code=inode" class="sref">inode /a>)-> a href="+code=i_dirty" class="sref">i_dirty /a>)) {> 422 /a>                         spao class="comment">/* /spaon> 423 /a> spao class="comment">                         * Add the inode to GC inode list. Garbage Collection /spaon> 424 /a> spao class="comment">                         * is serialized and no two processes manipulate the /spaon> 425 /a> spao class="comment">                         * list simultaneously. /spaon> 426 /a> spao class="comment">                         */ /spaon> 427 /a>                         a href="+code=igrab" class="sref">igrab /a>( a href="+code=inode" class="sref">inode /a>);> 428 /a>                         a href="+code=list_add" class="sref">list_add /a>(& a href="+code=NILFS_I" class="sref">NILFS_I /a>( a href="+code=inode" class="sref">inode /a>)-> a href="+code=i_dirty" class="sref">i_dirty /a>,> 429 /a>                                 & a href="+code=nilfs" class="sref">nilfs /a>-> a href="+code=ns_gc_inodes" class="sref">ns_gc_inodes /a>);> 430 /a>                }> 431 /a>> 432 /a>                do {> 433 /a>                         a href="+code=ret" class="sref">ret /a> =  a href="+code=nilfs_ioctl_move_inode_block" class="sref">nilfs_ioctl_move_inode_block /a>( a href="+code=inode" class="sref">inode /a>,  a href="+code=vdesc" class="sref">vdesc /a>,> 434 /a>                                                           & a href="+code=buffers" class="sref">buffers /a>);> 435 /a>                        if ( a href="+code=unlikely" class="sref">unlikely /a>( a href="+code=ret" class="sref">ret /a> < 0)) {> 436 /a>                                 a href="+code=iput" class="sref">iput /a>( a href="+code=inode" class="sref">inode /a>);> 437 /a>                                goto  a href="+code=failed" class="sref">failed /a>;> 438 /a>                        }> 439 /a>                         a href="+code=vdesc" class="sref">vdesc /a>++;> 440 /a>                } while (++ a href="+code=i" class="sref">i /a> <  a href="+code=nmembs" class="sref">nmembs /a> &&> 441 /a>                          a href="+code=vdesc" class="sref">vdesc /a>-> a href="+code=vd_ino" class="sref">vd_ino /a> ==  a href="+code=ino" class="sref">ino /a> &&  a href="+code=vdesc" class="sref">vdesc /a>-> a href="+code=vd_cno" class="sref">vd_cno /a> ==  a href="+code=cno" class="sref">cno /a>);> 442 /a>> 443 /a>                 a href="+code=iput" class="sref">iput /a>( a href="+code=inode" class="sref">inode /a>);  spao class="comment">/* The inode still remains in GC inode list */ /spaon> 444 /a>        }> 445 /a>> 446 /a>         a href="+code=list_for_each_entry_safe" class="sref">list_for_each_entry_safe /a>( a href="+code=bh" class="sref">bh /a>,  a href="+code=n" class="sref">n /a>, & a href="+code=buffers" class="sref">buffers /a>,  a href="+code=b_assoc_buffers" class="sref">b_assoc_buffers /a>) {> 447 /a>                 a href="+code=ret" class="sref">ret /a> =  a href="+code=nilfs_gccache_wait_and_mark_dirty" class="sref">nilfs_gccache_wait_and_mark_dirty /a>( a href="+code=bh" class="sref">bh /a>);> 448 /a>                if ( a href="+code=unlikely" class="sref">unlikely /a>( a href="+code=ret" class="sref">ret /a> < 0)) {> 449 /a>                         a href="+code=WARN_ON" class="sref">WARN_ON /a>( a href="+code=ret" class="sref">ret /a> == - a href="+code=EEXIST" class="sref">EEXIST /a>);> 450 /a>                        goto  a href="+code=failed" class="sref">failed /a>;> 451 /a>                }> 452 /a>                 a href="+code=list_del_init" class="sref">list_del_init /a>(& a href="+code=bh" class="sref">bh /a>-> a href="+code=b_assoc_buffers" class="sref">b_assoc_buffers /a>);> 453 /a>                 a href="+code=brelse" class="sref">brelse /a>( a href="+code=bh" class="sref">bh /a>);> 454 /a>        }> 455 /a>        return  a href="+code=nmembs" class="sref">nmembs /a>;> 456 /a>> 457 /a>  a href="+code=failed" class="sref">failed /a>:> 458 /a>         a href="+code=list_for_each_entry_safe" class="sref">list_for_each_entry_safe /a>( a href="+code=bh" class="sref">bh /a>,  a href="+code=n" class="sref">n /a>, & a href="+code=buffers" class="sref">buffers /a>,  a href="+code=b_assoc_buffers" class="sref">b_assoc_buffers /a>) {> 459 /a>                 a href="+code=list_del_init" class="sref">list_del_init /a>(& a href="+code=bh" class="sref">bh /a>-> a href="+code=b_assoc_buffers" class="sref">b_assoc_buffers /a>);> 460 /a>                 a href="+code=brelse" class="sref">brelse /a>( a href="+code=bh" class="sref">bh /a>);> 461 /a>        }> 462 /a>        return  a href="+code=ret" class="sref">ret /a>;> 354 /a>> 355 /a>static int  a href="+lasete_"srckpo"> octl_do_get_bdescs" class="srasete_"srckpo"> oass="o_get_bdescs /a>(struct  a href="+code=the_nilfs" class="sref">the_nilfs /a> * a href="+code=nilfs" class=ue=L354"> 354 /a>> 356 /a>                                          struct  a href="+code=nilfs_argv" class="sref">nilfs_argv /a> * a href="+code=argv" class="sref">argv /a>, void * a href="+code=buf" class="sref">buf /a>)>) {> 458 /a>         a href="+code=size_t" class="sref">size_t /a>  a href="+code=nmembs" class="sref">nmembs /a> =  a href="+code=argv" class="sref">argv /a>-> a href="+code=v_nmembs" class="sref">v_nmembs /a>;> 359 /a>        struct  a href="+code=inode" class="sref">inode /a>cpt  a href="+code=ficpt  a class="sref">ret /a> =  a href="+code=nilfs" class="sref">nilfs /a>-> cpt  a href="+code=fit; cpt  as="sref">v_nmembs /a>;> 310 /a>        struct  a hperiohref="+code=failt  a hperiohlass="sref">inode /a>perioh href="+code=nilperioh  class="sref">ret /a> =  a href="+code=buf" class="sref">buf /a>;> 411 /a>        int  a href="+code=ret" class="sref">ret /a>,  a href="+code=i" class="sref">i /a>;> 442 /a>> 315 /a>        for ( a href="+code=i" class="sref">i /a> = 0;  a href="+code=i" class="sref">i /a> <  a href="+code=nmembs" class="sref">nmembs /a>;  a href="+code=i" class="sref">i /a>++) {> 374 /a>                 a href="+code=ret" class="sref">ret /a> =  a hcpt  a+lasete_"srckpo"> octl_do_get_bdescs" clcpt  a+lasete_"srckpo"> oass=""sref">i /a>++) {> 375 /a>       sref">inode /a>cpt  a href="+code=ficpt  a class="sref">ret /a>perioh href="+code=nilperioh  cla"sref">bdescs /a>[ a href="+code=i" class="sref">i /a>p_ue=r a href="+code=rp_ue=r  class="sref">ret /a>perioh href="+code=nilperioh  cla"sref">bdescs /a>[ a href="+code=i" class="sref">i /a>p_enhref="+code=failp_enh" class="sref">bh /a>);> 376 /a> 347 /a>        if ( a href="+code=ret" class="sref">ret /a> < 0)> 377 /a>       > 462 /a>        return  a href="+code=ret" class="sref">ret /a>;> 455 /a>        return  a href="+code=nmembs" class="sref">nmembs /a>;> 330 /a>}> 431 /a>> 332 /a>static int  a href="+free" class="octl_do_get_bdescs" class="sfree" class="oass="o_get_bdescs /a>(struct  a href="+code=the_nilfs" class="sref">the_nilfs /a> * a href="+code=nilfs" class=ue=L354"> 354 /a>> 453 /aaaaaaaaaaaaaaaaaaaaaaa                 struct  a href="+code=nilfs_argv" class="sref">nilfs_argv /a> * a href="+code=argv" class="sref">argv /a>, void * a href="+code=buf" class="sref">buf /a>)> 334 /a>{> 458 /a>         a href="+code=size_t" class="sref">size_t /a>  a href="+code=nmembs" class="sref">nmembs /a> =  a href="+code=argv" class="sref">argv /a>-> a href="+code=v_nmembs" class="sref">v_nmembs /a>;> 360 /a>        int  a href="+code=ret" class="sref">ret /a>;>ret /a>;> 458 /a>         a href="+code=ret" class="sref">ret /a> =  a hdatsfree="+code=nilfs_argv" cldatsfree=ass="sref">brelse /a=  a href="+code=nilfs" class="sref">nilfs /a>-> dat href="+code=fit; datss="sref">buffers /a>,* a href="+code=buf" claass="sref">bh /a>,  a href="+code=nmembs" class=ass="sref">bh /a>);> 399 /a>> 455 /              if ( a href="+code=ret" class="sref"?"> 458 /a>         a href="+code=ret" clas:/a>        return  a href="+code=nmembs" class="sref">nmembs /a>;> ="shs="sref">the_nilfs /a> * a 4ide=L392" class="line" n4mue=L492"> 442 /a>> 300 /a>static int  a href="+code=nilfs_i_and_move_d_mark_dirty" class="sref">nilfs_i_and_move_d_markbdescs /a>(struct  a href="+code=the_nilfs" class="sref">the_nilfs /a> * a href="+code=nilfs" class=ue=L354"> 354 /a>> 394 /a>          aaaaaaaaaaaaaa                 struct  a href="+code=nilfs_argv" class="sref">nilfs_argv /a> * a href="+code=argv" class="sref">argv /a>, void * a href="+code=buf" class="sref">buf /a>)> 334 /a>{> 396 /a>         a href="+code=size_t" class="sref">size_t /a>  a href="+code=nmembs" class="sref">nmembs /a> =  a href="+code=argv" class="sref">argv /a>-> a href="+code=v_nmembs" class="sref">v_nmembs /a>;> 407 /a>        struct  a href="sref">bmade=argp" class="sref">bmads_argv /a> * a href="bmade=argp" class="bmads_args /a> =  a href="+code=NILFS_I" class="sref">NILFS_I /a>( a href="+code=nilfs" class="sref">nilfs /a>-> dat href="+code=fit; datss="sref">buffede /a>)-> a href="+cbmade=argp" class="i>bmads_arbs /a>;> 407 /a>        struct  a href="sref">bilfs_bdesc" class="sref">nilfs_bdegv /a> * a href="b_get_bdescs" class="o_get_bdeset /a> =  a href="+code=buf" class="sref">buf /a>;> 339 /a>        int  a href="+code=ret" class="sref">ret /a>,  a href="+code=i" class="sref">i /a>;> 4i /a>;> 401 /a>        for ( a href="+code=i" class="sref">i /a> = 0;  a href="+code=i" class="sref">i /a> <  a href="+code=nmembs" class="sref">nmembs /a>;  a href="+code=i" class="sref">i /a>++) {> 452 /a>           a>);  spao class="commenXXX: use macro    inlass ef"> inoass=" livenk ad list */ /spaon> 453 /aaaaaaaaaaaa       a href="+code=ret" class="sref">ret /a> =  a hdatsfree="+bmad_lookup_="slevedd_tail" class="ree="+bmad_lookup_="slevedbrelse /a>( a href="+made=argp" class="bmads_ar354 /a>> 394 /a>          aaaaaaaaaaaaaa           aaaaaaaa       a href="b_get_bdescs" class="o_get_bdescs /a>[ a href="+code=i" class="sref">i /a>p_enhref="+bcode=vd_offset" class="bref">vd_offset /a>,> 375 /a>       sref">inodeaaaaaa           aaaaaaaa       a href="b_get_bdescs" class="o_get_bdescs /a>[ a href="+code=i" class="sref">i /a>p_enhref="+bcolevedd_tail" class="bcoleved"> 37+ 1et /a>,> 356 /a>                                           t /a>(& a href="+_get_bdescs" class="o_get_bdescs /a>[ a href="+code=i" class="sref">i /a>p_enhref="+bcoe=vd_vblocknr" class="bref">vd_blockbh /a>);> 417 /a>                if ( a href="+code=ret" class="sref"?"> 458 /a>a>++) {> 438 /a>                        if ( a href="+code=ret" class="sref"?">! /a> == - a href="+code=ENOENT" class="sref">ENOENT /a>)> 429 /a>                                return  a href="+code=ret" class="sref">ret /a>;> 450 /a>                  (& a href="+_get_bdescs" class="o_get_bdescs /a>[ a href="+code=i" class="sref">i /a>p_enhref="+bcoe=vd_vblocknr" class="bref">vd_block>i /at /a>;> 451 /a>                }> 452 /a>                if ( a href="+_get_bdescs" class="o_get_bdescs /a>[ a href="+code=i" class="sref">i /a>p_enhref="+bcoe=vd_vblocknr" class="bref">vd_block>!t /a> =  a href="+_get_bdescs" class="o_get_bdescs /a>[ a href="+code=i" class="sref">i /a>p_enhref="+bcode=vd_vblocknr" class="breof">vd_blockb     }> 453 /aaaaaaaaaaaaaaaaaaaa a>);  spao class="commenskip deadirtual  list */ /spaon> 414 /a>                  continueat /a>;> 415 /a>                if ( a href="+_get_bdescs" class="o_get_bdescs /a>[ a href="+code=i" class="sref">i /a>p_enhref="+bcolevedd_tail" class="bcoleved"> 37s /a>>a>++) {> 416 /a>                  (& a href="+code=ret" class="sref">ret /a> =  a hdatsfree="+mdt_i_and_moved_mark_dirty" class="sref">mdt_i_and_moved_markbrelse /a=  a href="+code=nilfs" class="sref">nilfs /a>-> dat href="+code=fit; datss="sref">buffer>++) {> 417 /a>                                                          a href="b_get_bdescs" class="o_get_bdescs /a>[ a href="+code=i" class="sref">i /a>p_enhref="+bcode=vd_offset" class="bref">vd_offsbh /a>);> 418 /a>                        if ( a href="+code=ret" class="sref"?"> 458 /a>a>++) {> 419 /a>                                 a href="+code=WARN_ON" class="sref">WARN_ON /a>( a href="+code=ret" class="sref">ret /a> == - a href="+code=ENOENT" class="sref">ENOENh /a>);> 420 /a>                                return  a href="+code=ret" class="sref">ret /a>;> 421 /a>                        }> 422 /a>          }     >a>++) {> 433 /a>                         a href="+code=ret" class="sref">ret /a> =  a href="+code=bmad_i_and_tail" class="ree="+bmad_i_anbrelse /a>( a href="+made=argp" class="bmads_ar3        a href="b_get_bdescs" class="o_get_bdescs /a>[ a href="+code=i" class="sref">i /a>p_enhref="+bcode=vd_offset" class="bref">vd_offsr>++) {> 394 /a>          aaaaaaaaaaaaaa           aaaaa  if ( a href="+_get_bdescs" class="o_get_bdescs /a>[ a href="+code=i" class="sref">i /a>p_enhref="+bcolevedd_tail" class="bcoleved"> 3Nh /a>);> 435 /a>                        if ( a href="+code=ret" class="sref"?"> 458 /a>a>++) {> 436 /a>                                 a href="+code=WARN_ON" class="sref">WARN_ON /a>( a href="+code=ret" class="sref">ret /a> == - a href="+code=ENOENT" class="sref">ENOENh /a>);> 427 /a>                                return  a href="+code=ret" class="sref">ret /a>;> 428 /a>                        }> 429 /a>                }> 430 /a>        }> 421 /a>        return  a href="+code=nmembs" class="sref">nmembs /a>;> 4      }> 4     }> 4tatic int  a href="+code=nilfs_prepare_clean_segs="c_bdescs" class="sfree" classprepare_clean_segs="c_bdescs /a>(struct  a href="+code=the_nilfs" class="sref">the_nilfs /a> * a href="+code=nilfs" class=ue=L354"> 354 /a>> 435 /a>                                       struct  a href="+code=nilfs_argv" class="sref">nilfs_argv /a> * a href="+code=argv" class="sref">argv /a>, v /a> * a href="kbude=nilfs" class=ukbudelockb     }> 4a>++) {> 437 /a>  const chargv /a> * a href="msg=nilfs" class=umsgnmembs /a>;> 438 /a>        int  a href="+code=ret" class="sref">ret /a>;> 399 /a>> 410 /a>         a href="+code=ret" class="sref">ret /a> =  a href="+code=nilfs_kpo"> octl_do_get_bdescs" class="srasete_"srckpo"> oass="o_get_bdesc /a> * a href="+code=nilfs" class=ue=L354"> 3 t /a>(& a href="+code=argv" class="sref">ar[1]3        a href="kbude=nilfs" class=ukbudelock[1]Nh /a>);> 441 /a>        if ( a href="+code=ret" class="sref"?"> 458 /a>a>++) {> 452 /a>           a>);  spao class="commeist */ /spaon> 423 /a> spao class="comment">           * c/a>entrly abort because ass="o_get_ c/a>be stiov">fat */ /spaon> 424 /a> spao class="comment">           *   depe dentaneously. /spaon> 425 /a> spao class="comment">            list */ /spaon> 416 /a>                 a href="msg=nilfs" class=umsgnmemet /      spao class="string">&annot kpo">  ass="o_get_t;data" h /a>);> 447 /a>                goto  a href="+code=failed" class="sref">failed /a>;> 449 /a>         a href="+code=ret" class="sref">ret /a> =  a href="+code=nilfs_="octl_do_get_bdescs" class="sfree" class="oass="o_get_bdesc /a> * a href="+code=nilfs" class=ue=L354"> 3 t /a>(& a href="+code=argv" class="sref">ar[2]3        a href="kbude=nilfs" class=ukbudelock[2]Nh /a>);> 450 /a>        if ( a href="+code=ret" class="sref"?"> 458 /a>a>++) {> 451 /a>           a>);  spao class="commeist */ /spaon> 423 /a> spao class="comment">           * c/a>entrly abort because DAT "sre    updatrialtomicalunlit */ /spaon> 423 /a> spao class="comment">           * usnflia copy-on-wrinipuechniqueeously. /spaon> 424 /a> spao class="comment">           *list */ /spaon> 415 /a>                 a href="msg=nilfs" class=umsgnmemet /      spao class="string">&annot kpo">  virtualirtuals from DAT "sret;data" h /a>);> 416 /a>                goto  a href="+code=failed" class="sref">failed /a>;> 458 /a>         a href="+code=ret" class="sref">ret /a> =  a href="+code=nilfs_i_and_move_d_mark_dirty" class="sref">nilfs_i_and_move_d_markbdesc /a> * a href="+code=nilfs" class=ue=L354"> 3 t /a>(& a href="+code=argv" class="sref">ar[3]3        a href="kbude=nilfs" class=ukbudelock[3]Nh /a>);> 459 /a>        if ( a href="+code=ret" class="sref"?"> 458 /a>a>++) {> 460 /a>           a>);  spao class="commeist */ /spaon> 423 /a> spao class="comment">           * c/a>entrly abort because * AdoperaColl    no de      iveeously. /spaon> 423 /a> spao class="comment">           *list */ /spaon> 453 /aaaaaaaaaaaa       a href="msg=nilfs" class=umsgnmemet /      spao class="string">&annot i_an copynflirtuals _markt;data" h /a>);> 394 /a>                goto  a href="+code=failed" class="sref">failed /a>;> 395 /a>        }> 356 /a>        return 0;>ret /a>;> 45 goto  a href="+code=failed" class="sref">failed /a>:> 449 /a>         a href="pss=tnd_tail" class="pss=tnbdesc /a> * a href="KERNde=PTR_ERR" class="KERNde=P"> 45       spao class="string">sref":ins sref"> duss=" preparaColl: %s: err=%d\nt;data" 354 /a>> 460 /a>                a href="msg=nilfs" class=umsgnmem>i /a>,  a href="+code=ret" class="sref">rNh /a>);> 421 /a>        return  a href="+code=ret" class="sref">ret /a>;> 4      }> 4     }> 300 /a>static int  a href="+code=nilfs_clean_segs="c_bdescs" class="sfree" classclean_segs="c_bdescs /a>(struct  a href="+code=inode" class="sref">inode /a> * a href="+code=inode" class="sref">ino,       struct  a href="+code=ficpt  a clas"sref">ree /a> * a href=""srde=argp" class=""srd4"> 354 /a>> 375 /a>       sref">inodeeeeeeeeeeeeeeeunsign"> tatic int  a href="cm=failed" class="cm=">argv /a>,c int  a href="__useblocknr" class="__usebs_argv /a> * a href="+code=argp" class="+codlockb     }> 4a>++) {> 407 /a>        struct  a href="sref">nilfs_argv" class="sref">nilfs_arg(& a href="+code=argv" class="sref">ar[5]et /a>;> 407 /a>     /a>sconst (& a href="+code=size_t" class="sref">size_t /a>  a href="sresze=argv" class="sresz">ar[5]et a>++) {> 429 /a>          srefofcs /a>(struct  a href="sref">nilfs_vdesc" class="sref">nilfs_vde)354 /a>> 460 /a>          srefofcs /a>(struct  a href="sref">+code=failt  a hperiohlass="sref">ino)354 /a>> 451 /a>          srefofcc int  a href="__ude=__u64" class="sref">__u)354 /a>> 452 /a>          srefofcs /a>(struct  a href="sref">bilfs_bdesc" class="sref">nilfs_bde)354 /a>> 453 /aaaaaaaaaaaasrefofcc int  a href="__ude=__u64" class="sref">__u)354 /a>> 454 /a>   et /a>;> 458 /a>   /a>,c int  a href="__useblocknr" class="__usebs_argv /a> * a href="bae=brelse" class="sas_nmembs /a>;> 360 /a>   /a>, void * a href="kbude=nilfs" class=ukbudelock[5]et /a>;> 407 /a>        struct  a href="+code=the_nilfs" class="sref">the_nilfs /a> * a href="+code=nilfs" class=ue=L354"> et /a>;> 458 /a>         a href="+code=size_t" class="sref">size_t /a>  a href="le+code=n" class="le+nmem>i /a>,  a href="nseg_inodes" class="sreg_4"> et /a>;> 339 /a>        int  a href="+code=n" class="sref">neturn  a href="+code=ret" class="sref">ret /a>;> 4i /a>;> 441 /a>      !c int  a href="capabode=ficpt  a classapabodbdesc /a> * a href="CAP_SYS_ADMIWARN_ON" class="CAP_SYS_ADMIW>__u)b     }> 452 /a>                ra> == - a href="+PERMARN_ON" class="+PERMf">ret /a>;> 4     }> 394 /a>         a href="+code=ret" class="sref">ret /a> =  a href="mnt_want_wrini_+code=ficpt  a clasmnt_want_wrini_+codbdesc /a> * a href=""srde=argp" class=""srd4"> Nh /a>);> 441 /a>       /a>,  a href="+code=ret" class="sref">rN /a>);> 416 /a>                return  a href="+code=ret" class="sref">ret /a>;>ret /a>;> 458 /a>         a href="+code=ret" class="sref">ret a> == - a href="+FAUL=ENOENT" class="sFAUL=f">ret /a>;> 459 /a>        if ( a href="copy_from_useblocknr" class="copy_from_usebbdesc /a> * a href="+code=argv" class="sref">argv /a> * a href="+code=argp" class="+codlock,asrefofcc int  a href="+code=argv" class="sref">ar))b     }> 460 /a>                goto  a href="oode=iput" class="ouef">ret /a>;> 431 /a>> 452 /a>         a href="+code=ret" class="sref">ret a> == - a href="+INVALENOENT" class="sINVALf">ret /a>;> 453 /aaaa /a>,  a href="nseg_inodes" class="sreg_4"> bs /a> =  a href="+code=argv" class="sref">ar[4>i /a>p_enhref="++code=v_nmembs" class="sref">v_nmembs /a>;> 394 /a>        if ( a href="+code=argv" class="sref">ar[4>i /a>p_enhref="++csrefnmembs" class="srsref"> 39!t /a> =  a href="sresze=argv" class="sresz">ar[4]b     }> 375 /a>       sre      goto  a href="oode=iput" class="ouef">ret /a>;> 356 /a>        if ( a href="nseg_inodes" class="sreg_4"> bs /a  goto  a href="UINT_MAXinodes" class="UINT_MAX4"> b/asrefofcc int  a href="__ude=__u64" class="sref">__u)b     }> 417 /a>                goto  a href="oode=iput" class="ouef">ret /a>;> 4t /a>;> 429 /a>   a>);  spao class="commeist */ /spaon> 423 /a> spao class="comment">   * sref[4] o_get_    segs="c number_  his ilfs2 cleans.  Weist */ /spaon> 423 /a> spao class="comment">   * use kmalloc()     it_ assoc_ because f">ory used     sreist */ /spaon> 423 /a> spao class="comment">   * segs="c number_ is enough smalleously. /spaon> 423 /a> spao class="comment">   *list */ /spaon> 394 /a>         a href="kbude=nilfs" class=ukbudelock[4]et /a> =  a href="memdup_useblocknr" class="memdup_usebbdesc( /a>,c int  a href="__useblocknr" class="__usebs_argv)(unsign"> long)  if ( a href="+code=argv" class="sref">ar[4>i /a>p_enhref="++cbae=brelse" class="+cbae=4"> 354 /a>> 415 /a>                           if ( a href="nseg_inodes" class="sreg_4"> b*asrefofcc int  a href="__ude=__u64" class="sref">__u)bet /a>;> 356 /a>        if ( a href="ISde=PTR_ERR" class="ISde=Pbdesc /a> * a href="kbude=nilfs" class=ukbudelock[4]< 0)) {> 417 /a>                 a href="+code=ret" class="sref">ret /a> =  a href="PTRde=PTR_ERR" class="PTRde=Pbdesc /a> * a href="kbude=nilfs" class=ukbudelock[4]&et /a>;> 418 /a>                goto  a href="oode=iput" class="ouef">ret /a>;> 419 /a>        }> 410 /a>         a href="+code=nilfs" class=ue=L354"> et /a> =  a href="+code=inode" class="sref">inoe /a>)-> a href="+csb=inode" class="scsb>inoe /a>)-> a href="s_ee" nfode=cno" class="s_ee" nfof">ret /a>;> 431 /a>> 422 /a>        for ( a href="+code=n" class="sref">i /a> = 0;  a href="+code=n" class="sref"> 458 4a> = 0;  a href="+code=n" class="sref">i /a>++) {> 433 /a>                 a href="+code=ret" class="sref">ret a> == - a href="+INVALENOENT" class="sINVALf">ret /a>;> 394 /a>                if ( a href="+code=argv" class="sref">ar[ = 0;  a href="+code=n" class="sref">i /a>p_enhref="++csrefnmembs" class="srsref"> 39!t /a> =  a href="sresze=argv" class="sresz">ar[ = 0;  a href="+code=n" class="sref">b     }> 435 /a>                        goto  a href="oods="oae=iput" class="oues="oaf">ret /a>;> 456 /a>> 427 /a>                if ( a href="+code=argv" class="sref">ar[ = 0;  a href="+code=n" class="sref">i /a>p_enhref="++code=v_nmembs" class="sref">v_nmembs /a  goto  a href="nseg_inodes" class="sreg_4"> b*a       a href="+code=nilfs" class=ue=L354"> fs /a>-> dat href="+_move_dper_segs="cinodes" class="sr+_move_dper_segs="cf">rN /a>);> 428 /a>                        goto  a href="oods="oae=iput" class="oues="oaf">ret /a>;> 399 /a>> 460 /a>                if ( a href="+code=argv" class="sref">ar[ = 0;  a href="+code=n" class="sref">i /a>p_enhref="++code=v_nmembs" class="sref">v_nmembs /at /a> =  a href="UINT_MAXinodes" class="UINT_MAX4"> b/a  if ( a href="+code=argv" class="sref">ar[ = 0;  a href="+code=n" class="sref">i /a>p_enhref="++csrefnmembs" class="srsref"> 3N /a>);> 421 /a>                        goto  a href="oods="oae=iput" class="oues="oaf">ret /a>;> 442 /a>> 433 /a>                 a href="le+code=n" class="le+nmembs /a> =  a href="+code=argv" class="sref">ar[ = 0;  a href="+code=n" class="sref">i /a>p_enhref="++csrefnmembs" class="srsref"> 39*a       a href="+code=argv" class="sref">ar[ = 0;  a href="+code=n" class="sref">i /a>p_enhref="++code=v_nmembs" class="sref">v_nmemet /a>;> 374 /a>                 a href="bae=brelse" class="sas_nmembs ( /a>,c int  a href="__useblocknr" class="__usebs_argv)(unsign"> long)  if ( a href="+code=argv" class="sref">ar[ = 0;  a href="+code=n" class="sref">i /a>p_enhref="++cbae=brelse" class="+cbae=4"> et /a>;> 435 /a>                if ( a href="le+code=n" class="le+nmembs /a>>a>++) {> 416 /a>                  (& a href="kbude=nilfs" class=ukbudelock[ = 0;  a href="+code=n" class="sref">gs /a> =  a href="+ULLENOENT" class="+ULL4"> et /a>;> 427 /a>                  continueat /a>;> 428 /a>                }> 399 /a>> 460 /a>                 a href="kbude=nilfs" class=ukbudelock[ = 0;  a href="+code=n" class="sref">gs /a> =  a href="vmallocbrelse" class="+mallocbdesc /a> * a href="le+code=n" class="le+nmem&et /a>;> 421 /a>              !c int  a href="kbude=nilfs" class=ukbudelock[ = 0;  a href="+code=n" class="sref">>>a>++) {> 452 /a>                         a href="+code=ret" class="sref">ret a> == - a href="+NOMEMARN_ON" class="+NOMEM4"> et /a>;> 433 /a>                        goto  a href="oods="oae=iput" class="oues="oaf">ret /a>;> 374 /a>                }> 435 /a>                if ( a href="copy_from_useblocknr" class="copy_from_usebbdesc /a> * a href="kbude=nilfs" class=ukbudelock[ = 0;  a href="+code=n" class="sref">3        a href="bae=brelse" class="sas_nmem3        a href="le+code=n" class="le+nmem&>>a>++) {> 416 /a>                         a href="+code=ret" class="sref">ret a> == - a href="+FAUL=ENOENT" class="sFAUL=f">ret /a>;> 447 /a>                         a href="v="oae=iput" class="v="oaf">rc /a> * a href="kbude=nilfs" class=ukbudelock[ = 0;  a href="+code=n" class="sref">&et /a>;> 428 /a>                        goto  a href="oods="oae=iput" class="oues="oaf">ret /a>;> 429 /a>                }> 430 /a>        }> 431 /a>> 452 /a>   a>);  spao class="commeist */ /spaon> 423 /a> spao class="comment">   * sref">nilfs_iove+_move_() will calu sref">ngees=or_gc(),ist */ /spaon> 424 /a> spao class="comment">   * which will operaCes /a>sref" list withoueirtualingeously. /spaon> 425 /a> spao class="comment">   * To protect * Adlist from concurr="c operaColls,ist */ /spaon> 423 /a> spao class="comment">   * sref">nilfs_iove+_move_ should>be ltomic operaColleously. /spaon> spao class="comment">   *list */ /spaon> 458 /a>        if ( a href="Cest_and_seesbiode=ret" class="Cest_and_seesbiof">rc /a> * a href="THE_sref">GC_RUNNINGde=ret" class="THE_sref">GC_RUNNINGnmem3 t /a>(& a href="+code=nilfs" class=ue=L354"> fs /a>-> dat href="+flag_inodes" class="sr+flag_nmem&>>a>++) {> 429 /a>                 a href="+code=ret" class="sref">ret a> == - a href="+BUSYENOENT" class="sBUSYf">ret /a>;> 460 /a>                goto  a href="oods="oae=iput" class="oues="oaf">ret /a>;> 430 /a>        }> 442 /a>> 453 /aaaa /a>,  a href="+code=ret" class="sref">ret /a> =  a href="+code=nilfs_iove+_move_=nilfs" class=ue=L35=nilfs_iove+_move_f">rc /a> * a href="+code=inode" class="sref">inoe /a>)-> a href="+csb=inode" class="scsb>ino3 t /a>(& a href="+code=argv" class="sref">ar[0]3        a href="kbude=nilfs" class=ukbudelock[0>&et /a>;> 394 /a>        if ( a href="+code=ret" class="sref"?"> 458 /at /a>;> 435 /a>            if ( a href="pss=tnd_tail" class="pss=tnbdesc /a> * a href="KERNde=PTR_ERR" class="KERNde=P"> 45       spao class="string">sref":ins sref"> duss=" preparaColl: &;data" t /a>;> 416 /a>                         spao class="string">&annot readisourceirtuals: err=%d\nt;data" 3i /a>,  a href="+code=ret" class="sref">rNh /a>);> 447 /a>       /a>);> 428 /a>           /a>,  a href="+code=ret" class="sref">ret /a> =  a href="+code=clean_segs="c_bdescs" class="sfree"clean_segs="c_bdesc /a> * a href="+code=inode" class="sref">inoe /a>)-> a href="+csb=inode" class="scsb>ino3 (& a href="+code=argv" class="sref">ar3        a href="kbude=nilfs" class=ukbudelockNh /a>);> 399 /a>> 410 /a>         a href="+code_stiov"_alu_gcsref"46l.101d5l.c#L369"5ide=L399" class="line" n5mue=L599"> 459 /a>        if ( a href="coe3a2b58s146l.c 435 /a>  /ar407 /a="+_runn46"tiov"_alu_gcsref"46l.101d5l.c#L369"5ide=L399" class="line" n5mue=L599"> 459 /a>   ne" n6muet" class="sref">ret /a>;6 4      }6 460 /a>       ue=L558"> 45 goto  a href="+co6 cla4s="l64e" n5mue=L573"> 4     }694 /a>        if ( a href="+code"srde=arg6" class=""srd4"> 354 /a>6 447 /a>                         a href="v="oae=iput" class="v="oaf">rc /a> * a href="kbude=nilfs" class=ukbudelock[ = 0;  a hr+code=arg6" class="+codlockb     }6 44k /a>                         a href="v="oae=iput" clas"PTRde=Pbdesc /a> * a href="kbude=cla4s="li6e" n5mue=L576"> 4a>++) {6 460 /    ue=L558"> 45 goto  a href="+co6  n6msoc_6lass="sref">ar[5]et /a>;6ar[5]et a>++) {6 416 /a>                return  a hre6sc" class6"sref">nilfs_vde)354 /a>6ino)354 /a>6__u)354 /a>6     ean_segs="c_bdescs" class="sfree" classclean_segs="c_bdescs /a>(struct  a href="+code=inode" class="sref">inode /a> * a href="+code=inode" class="sref">ino,       struct  a href="+code=ficpt  a clas"sref">ree /a> * a href=6sc" class6"sref">nilfs_bde)354 /a>6 375 /a>       sref">inodeeeeeeeeeeeeeeeunsign"> tatic int  a href="cm=failed" class="cm=">argv /a>,c int  a href="__useblocknr" class="__usebs_argv /a> * a href=6de=__u64"6class="sref">__u)354 /a>6 454 /a>   et /a>;6 tatic int  "nseg_inodes" class="sreg_L575"> 375 /a>   nf="+csb=inode" c nf6 /a>                return  a hre6scode=arg6" class="sas_nmembs /a>;6 438 /a>        int  a hre6=nilfs" c6ass=ukbudelock[5]et /a>;6 407 /a>        struct  a href="+code=the_nilfs" class="sref">the_nilfs /a> * a href="+6ode=nilfs6 class=ue=L354"> et /a>;6 et /a>;6 449 /a>        L368"5l.ce=nilfs" class=ue=L354">     L368"5l.ce=nilfs"f="+code=clean_segs="c_bdescs" class="sfree"clean_segs="c_bdesc /a> * a href="+code=inode" class_wrini_+codbdesc /a> * a href="6="+code=r6t" class="sref">ret /a>;6 450rini_+codbdesc /a> * a href="6= a hperi64e" n5mue=L590"> 4i /a>;6 416 /a>                return  a hre6" class="6AP_SYS_ADMIW>__u)b     }6ret /a>;6 410 /a>         a href="+code=nilfs" class=ue=L354"> et /a> =  a href="+code=inode" class="sref">inoe /a>)-> a href="+csb=inode" class="scsb>inoe /a>)-> a href="s_ee" nfod class="l6ne" n5mue=L593"> 4     }6     58 /aop" class=ue=L354">     58 /aop"tiov"_alu_gcsref"46l.101d5l.c#L369"5ide=L399" clalass="scsb>ino3 (BARRIEef="pss=tnd_tailBARRIEeL354"> fs /a>-> dat href="+flag_inosrde=argp6 class=""srd4"> Nh /a>);6 449 /a>  blkdev_issu="+lush = 0;  a href="+lkdev_issu="+lushf="+code=clean_segs="c_bdescs" class="sfree"clean_segs="c_bdesc /a> * a href="+code=inode" class="sref">inoe /a>)->bdev="+csb=inode" clabdev clalass="scsb>ino3 (GFP_" clE = 0;  a href="+GFP_" clE  clalass="scsb>ino3 (ck[ = 0;  a href="+code=n" _wrini_+codbdesc /a> * a href="6=code=arg6t" class="sref">rN /a>);6WARN_ON /IO a href="+code=rIO class="__usebs_argv /a> * a href=6="+code=r6t" class="sref">ret /a>;6 416 /a>                return  a hre6"de=nilfs6ne" n5mue=L59f">ret /a>;6ret /a>;6ar))b     }7i /a>p_eck[ = 0;  a href="+code=n" _ fs /a>-> dat href="+flag_in7="oode=ip7t" class="ouef">ret /a>;7i /a>p_edown_16 /= 0;  a href="+down_16 /f="+c_sref">GC_RUNNINGde=ret" class="THE_sref">GC_RUNNINGnmem3 t /a>(& a =nicto; dam"+code=nilfs" clas=nicto; dam=n" _wrini_+codbdesc /a> * a href="7 cla4"fs/7ecla46mue=L601"> 431 /a>7 375 /a>   nf="+csb=inode" c nf6 /ae=L549"> 449 /a>       class="THE_sref">GC_RUNNINGnmem3 t /a>(& a  nf="+csb=inode" c a  nf6 /ae- 1wrini_+codbdesc /a> * a href="7 3la4"fs/7eclass="+PERMf">ret /a>;7GC_RUNNINGde=ret" class="THE_sref">GC_RUNNINGnmem3 t /a>(& a =nicto; dam"+code=nilfs" clas=nicto; dam=n" _wrini_+codbdesc /a> * a href="7 4la4"fs/7ee" n5mue=L593"> 4     }7 435 /a>     ton6muef="+code=clean_segs=/a> * a href="+code=argv" cla_sref">GC_RUNNINGde= nf="+csb=inode" c nf6 /alass="sref">argv /a> * a nf="+csb=inode" c nf6 /acodlock,asrefofcc int  a href="+7e=argv" c7ass="sresz">ar[4]b     }7ret a> == - a href="+FA7="oode=ip7t" class="ouef">ret /a>;7__u)b     }7ret /a>;7ret /a>;7inode /a> * a href="+code=inode" class="sref">ino,       struct  a href="+code=ficpt  a clas"sref">ree /a> * a href=7his ilfs27cleans.  Weist */ /spaon7 tatic int  a href="cm=failed" class="cm=">argv /a>,c int  a href="__useblocknr" class="__usebs_argv /a> * a href=7e f">ory 7sed     sreist */ /spaon7 375 /a>  newar[ = 0;  a href="+3ewar[ ass="sref">ret a> == - a href="+FA7class="co7ment">   *list */ /spaon7            ne" n5mue=L592"> 452 /a>                ra> == - a href="+7e=brelse"7class="+cbae=4"> 354 /a>7__u)bet /a>;7 441 /a>      !c int  a href="capabode=ficpt  a classapabodbdesc /a> * a href="CAP_SYS_ADMIWARN7if ( a hr7=ukbudelock[4]< 0)) {7{> 418 /a>                goto  a h7e=nilfs" 7lass=ukbudelock[4]&et /a7;>ret /a7;> 449 /a>         a href="+code=ret" class="sref">ret /a> =  a href="mnt_want_wrini_+code=ficpt  a clasmnt_want_wrini_+codbdesc /a> * a href7"line" n67ue=L619"> 419 /a>       7}> * a href="CAP_SYS_ADMIWARN7ode=cno" 7lass="s_ee" nfof">ret /a7;> 418 /a>                goto  a h71" class=7line" n6mue=L621"> 431 /7>>i /a>++)7{>ret a> == - a href="+FNVALENOEN7" class="sINVALf">ret /a7;> 435 /a>                i+c_sref">GC_RUNNINGde newar[ = 0;  a href="+3ewar[ asopy_from_usebbdesc /a> * a href="+code=argv" class="sref">argv /a> *e newar[ = 0;  a href="+3ewar[ as/acodlock,asrefofcc int  a href=" href="+c7de=n" class="sref">b    7}>ret a> == - a href="+FN7e"oode=iclass="oues="oaf">ret /a7;> 456 /7>> 449 /a>      ="rear_et" class="THE_sref">G ="rear_etshf="+code=clean_segs="c_bdescs" class="sfree"clean_segs="c_bdesc /a> * a href="+code=inode" cla" class="sref">siz newar[ = 0;  a href="+3ewar[ as/s="sref">ret a> == - a href="+FN=nilfs" 7ve_dper_segs="cf">rN /a>7;>ret /a7;> 45 goto  a href="+79" class=7line" n6mue=L629"> 399 /7>> 3N /a>7;> 41  ue=L558"> 45 goto  a href="+79" class=7class="oues="oaf">ret /a7;> 416 /a>                return  a h72" class=7line" n6mue=L632"> 442 /7>>v_nmemet /a7;> et /a7;> tatic int  a href="cm=failed" class="cm=">argv /a>,c int  a href="__useblocknr" class="__usebs_argv /a> * a hrefcode=n" c7ass="le+nmembs /a>>a>++)7{> et /a7;> 407 /a>        struct  a href="+code=the_nilfs" class=L620"> 410 /a>         a href="+code=nilfs" class=ue=L354"> et /a> =  a href="+code=inode" class="sref">inoe /a>)-> a href="+csb=inode" class="scsb>inoe /a>)-> a href="s_ee" n7/a>      7           continueat /a7;> 375 /a>rangr[ = 0;  a href=rangr[   [260 /a>   /a>, void * a href="kb76mue=L6387> 428 /a>               7}> 375 /a>miclasode=ret" class="iclas cla" class="sref">simaxlasode=ret" class="axlascsb>inoe /a>)-> a href="s_ee" n79" class=7line" n6mue=L639"> 399 /7>> 410 iegbytn6csb>inoe /a>)-> a href="s_ee" n79refnmemb7=n" class="le+nmem&et /a7;>            ne" n5mue=L592"> 452 /a>                ra> == - a href="ref="+cod7=n" class="sref">>>a>++)7{> et /a7;> 441 /a>      !c int  a href="capabode=ficpt  a classapabodbdesc /a> * a href="CAP_SYS_ADMIWARN7oae=iput"7class="oues="oaf">ret /a7;> 418 /a>                goto  a h76mue=L6447> 374 /a>               7}>ret a> == - a href="+FAUL=ENOEN7" class="sFAUL=f">ret /a7;> 435 /a>                if ( a href="coprangr[ = 0;  a href=rangr[   opy_from_usebbdesc /a> * a href="+code=argv" class="sref">argv /a> *idt  "nseg_inodes" class="sre[26/acodlock,asrefofcc int  a href="href="+co7e=n" class="sref">&et /a7;> 418 /a>                goto  a h76mue=L6387class="oues="oaf">ret /a7;> 429 /a>               7}> 430 /a>       7}> 375 /a>rangr[ = 0;  a href=rangr[   [1]s="sref">i /a>p_enhrei+codeup_16 /= 0;  a href=i+codeup_16shf="+code=clean_segs="c_bdescs" class="sfree"clean_segs="c_bdesc /a> * a href="+code=inode" class="sref">inoe /a>)->bdev="+csb=inode" clabdev css="sref">inoe /a>)-bd_s="c_bdescs" class="bd_s="c_desc /a> * a href="CAP_SYS_ADMIWARN71" class=7line" n6mue=L651"> 431 /7>> 418 /a>                goto  a h7a>);  spa7 class="commeist */ /spa7n>7gees=or_gc(),ist */ /spa7n> 410 iegbytn6csb>/ae=L549"> 449 /a>       class="THE_sref">GC_RUNNINGnmem3 t /a>(& a href="+code=nilfs" class=ue=L354"> fs /a>-> dat href=ef">v_nmembs /a  goto  a href="nseg_inodes" class="sreg_4"> b*a       a hrefwar[ = 0;  a href="  a hrefwar> 418 /a>                goto  a h7amue=L6447oueirtualingeously. /spa7n> 449 /a>rangr[ = 0;  a href=rangr[   [0] +2/ioc6l.c#L414"6iegbytn6mue=L670"> 410 iegbytn6csb>/ae- 1wrini_+codbdesc /a> * a href=ld>be lto7ic operaColleously. /spa7n>siiegbytn6mue=L670"> 410 iegbytn6csb>nt_wrini_+codbdesc /a> * a href7o class="7omment">   *list */ /spa7n>rcSB2_OFFSET_BYTESode=ret" class=lf">rcSB2_OFFSET_BYTES    if ( a href="coprangr[ = 0;  a href=rangr[   [1]nt_wrini_+codbdesc /a> * a href7omue=L6387ss="sr+flag_nmem&>>a>++)7{>siiegbytn6mue=L670"> 410 iegbytn6csb>nt_wrini_+codbdesc /a> * a href7+BUSYENOE7T" class="sBUSYf">ret /a7;>ret /a7;> 430 /a>       7}>GC_RUNNINGnmem3 t /a>(& au="+code=ret" class=p; au="+c cla" class="sref">simiclasode=ret" class="iclas cla" class="sref">simaxlasode=ret" class="axlascsb>nt_wrini_+codbdesc /a> * a href7+>);  spa7line" n6mue=L662"> 442 /7>> 41  ue=L558"> 45 goto  a href="+7e=nilfs" 7lass=ukbudelock[0>&et /a7;> 416 /a>                return  a h7de=ret" c7ass="sref"?"> 458 /at /a7;>rNh /a>7;>inode /a> * a href="+code=inode" class="sref">ino,       struct  a href="+code=ficpt  a clas"sref">ree /a> * a href4e" n6mso7_667"> 447 /a>       /a>7;> 375 /a>       sref">inodeeeeeeeeeeeeeeeunsign"> tatic int  a href="cm=failed" class="cm=">argv /a>,c int  a href="__useblocknr" c  a clas"sref">ree /a> * a href4mue=L6387" class=ukbudelockNh /a>7;>siide=L388" cla4s="li48" n5mue=L558"> 458 /a>    e=n" ref="++csrefnmeme=n" rr" c  a clas"sref">ree /a> * a href9" cla4s=7li46" n6mue=L669"> 399 /7>>siiide=L388" cla4s="li48"" n5mue=L55(m=">argv /a>,c idofusyn> 452 /a>     dofusycsb>n   ean_segs="c_bdescs" 7" cla4s="li4e" n5ms="s587"> 407 /a>     a clas"sref">ree /a> * a href9line" n67 ( a href="coe3a2b58s1467.csiidt  "nseg_inodes" class="sreg*,n5mu  a clas"sref">ree /a> * a href9line" n67uet" class="sref">ret /a7;6siide=L388" cla4s="li48" n5mue=L5" class="sref">siide=L388" cla4s="li48" n5mue=L5 /a> * a href="CAP_SYS_ADMIWARN72"cla4s="7i67" n5mue=L572"> 4     7}6 4    7}6 354 /7>6 407 /a>        struct  a href="+code=the_nilfs" class=L620"> 410 /a>         a href="+code=nilfs" class=ue=L354"> et /a> =  a href="+code=inode" class="sref">inoe /a>)-> a href="+csb=inode" class="scsb>infs /a>-> dat href="+flag_7d=" prepa7g6" class="+codlockb    7}6)-> a href="+cs=L374">)-&e=L558"> 458 /a>    >)-> a href="+csb=inode"infs /a>-> dat href="+flag_7d="+code=7i6e" n5mue=L576"> 4a>++)7{6 438 /a>        int  a h7o6  n6mso7_6lass="sref">ar[5]et /a7;6ar[5]et a>++)7{6 459 /a>        i="sref">inoe /a>)-> a href="+csb=inode" clasopy_from_usebbdesc /a> * a href="+code=argv" class="sref">argv /a> * a href="+code=argp" class="+codlock,asrefofcc int  a href=7e6sc" cla7s6"sref">nilfs_vde)354 /7>6ret a> == - a href="+F"l  a hpe7i6hlass="sref">ino)354 /7>6__u)354 /7>6ar[ = 0;  a href="+code=n" c550">8"> 458 /a>    e=n" ref="++csrefnmeme=n" rr" ccodlock,asrefofcc int  a href=7e"cla4s="7s6"sref">nilfs_bde)354 /7>6ret a> == - a href="+7=6de=__u67"6class="sref">__u)354 /7>6 454 /a>   et /a7;6 tatic ide=L463" class="line" n6mue=L663"> 453 /aaaa /a>,  a hwrap_"> 4ef="+csb=inode"=L374" cla4swrap_"> 4shf="+code=clean_sege=ret" class="THE_sref">GC_RUss="sref">inoe /a>)-> a href="+csb=inode" clasopy_from_usebbdes_IOC_DIIEef="pss=tnd_ta_IOC_DIIshf="+code=clean_seg       sref">inodeeeeeeee)opy_from_usebbdesdofusyn> 452 /a>     dofusycsb>ns="sref">ret a> == - a href="+7==" prepa7g6" class="sas_nmembs /a7;6 tatic ide=L463" class="line" n6m550"> 450rini_+codbdesc /a> * a href7e6=nilfs"7c6ass=ukbudelock[5]et /a7;6 416 /a>                return  a h7+6ode=nil7s6 class=ue=L354"> et /a7;6 et /a7;6 435 /a>     ton6muef="+code=clean_segs=/a> * a href="+code=argv" cla_sref">GC_RUNNINGdt; a href="+csb=inode" clasoplass="sref">argv /a> * a href="+code=argp" class="+codlock,asrefofcc int  a href=7"6="+code7r6t" class="sref">ret /a7;6ret a> == - a href="+F"6= a hpe7i64e" n5mue=L590"> 4i /a7;6 416 /a>                return  a h7e6" class7"6AP_SYS_ADMIW>__u)b    7}6ret /a7;6 4    7}6ino,       struct  a href="+code=ficpt cLLli4e" n5mue=L575"> 375 /a>       sref">inodeeeeeeeeeembs ( /a>,c i2/io45l.c#L368"5" cref="+code=argp" cr" ccodlock,asrefofcc int  a href=7nosrde=ar7p6 class=""srd4"> Nh /a>7;6rN /a>7;6 453 /aastruct  a href="+code=ficptss="sref">inoe /a>)-f_dentr4ef="+csb=inode"f_dentr4icptss="sref">inoe /a>)-d_s="c_bdescs" class="d_s="c_desc/a>                return  a h7e6=nilfs"7r6t" class="sref">ret /a7;6 tatic int  a href="cm=failed" class="cm=">argv /a>,c int  a href="__useblocknr" c 374 /a>                 a href="bae=brelse" class="sas_nm/io45l.c#L368"5" cref="+code=argp" cr" c/a>                return  a h7e6ode=nil7s6ne" n5mue=L59f">ret /a7;6ret /a7;6inodeeeeeeee) _ fs /a>-> dat href="+flag_897ode=arg8"7class="sref">ar))b    8}7 41  ue=L558"> 45 goto  a href="+8n7="oode=8p7t" class="ouef">ret /a8;7ret a> == - a href="+8"7 cla4"f8/7ecla46mue=L601"> 431 /8>7 41  ue=L558"> 45 goto  a href="+8n3 cla4"f8/6 class="+PERMf">ret /a8;7ret a> == - a href="+8"4 cla4"f8/6ne" n5mue=L593"> 4    8}7 45 goto  a href="+8n5 cla4"f8/6 class=""srd4"> Nh /a>8}7ret a> == - a href="+8"6 cla4"f8/6t" class="sref">rN /a>8;7rcIOCTL_CHANGE_CPMODE  a href="+codelf">rcIOCTL_CHANGE_CPMODE> 41  ue=L558"> 45 goto  a href="+8n7 cla4"f8/6t" class="sref">ret /a8}7inodeeeeeeeeee=">argv /a>,c int  a href="__useblocknr" cns="sref">ret a> == - a href="+8"8 cla4"f8/6ne" n5mue=L59f">ret /a8;7rcIOCTL_DELETE_CHECKPOIN   a href="+codelf">rcIOCTL_DELETE_CHECKPOIN > 41  ue=L558"> 45 goto  a href="+8n9 cla4"f8/6class="sFAUL=f">ret /a8;7    cla4sdeletr_checkpoilfuef="+code=clean_segruct  a href="+code=inode" clas=">argv /a>,c istruct  a href="+code=ficpt c=">argv /a>,c i       sref">inodeeeeeeeeee=">argv /a>,c int  a href="__useblocknr" cns="sref">ret a> == - a href="+897);  spa8 7lass="commeist */ /spa8n7rcIOCTL_GET_CPINF/IO a href="+codlf">rcIOCTL_GET_CPINF/> 41  ue=L558"> 45 goto  a href="+8=7his ilf827cleans.  Weist */ /spa8n7inodeeeeeeeeee=">argv /a>,c int  a href="__useblocknr" c  a clas"sref">ree /a> * a hre8=7e f">or8 7sed     sreist */ /spa8n7ree /a> * a hre8=3 cla4"f8e7ough smalleously. /spa8n7ret a> == - a href="+894 cla4"f8o7ment">   *list */ /spa8n7rcIOCTL_GET_CPSTA   a href="+codelf">rcIOCTL_GET_CPSTA > 41  ue=L558"> 45 goto  a href="+8=5 cla4"f8"7class="+cbae=4"> 354 /8>7inodeeeeeeeeee=">argv /a>,c int  a href="__useblocknr" cns="sref">ret a> == - a href="+896 cla4"f8p7lass="sref">__u)bet /a8;7rcIOCTL_GET_SUINF/IO a href="+codlf">rcIOCTL_GET_SUINF/> 41  ue=L558"> 45 goto  a href="+8=7 cla4"f8=ukbudelock[4]< 0)) {8{>inodeeeeeeeeee=">argv /a>,c int  a href="__useblocknr" c  ue=L558"> 45 goto  a href="+8=8 cla4"f8lass=ukbudelock[4]&et /a8;>ree /a> * a hre8=9 cla4"f8put" class="ouef">ret /a8;>ret a> == - a href="+8"line" n68ue=L619"> 419 /a>       8}>rcIOCTL_GET_SUSTA   a href="+codelf">rcIOCTL_GET_SUSTA > 41  ue=L558"> 45 goto  a href="+8ode=cno" 8lass="s_ee" nfof">ret /a8;>inodeeeeeeeeee=">argv /a>,c int  a href="__useblocknr" cns="sref">ret a> == - a href="+8"7e f">or8line" n6mue=L621"> 431 /8>>rcIOCTL_GET_VINF/IO a href="+codlf">rcIOCTL_GET_VINF/> 41  ue=L558"> 45 goto  a href="+8ef="+code8n" class="sref">i /a>++)8{>inodeeeeeeeeee=">argv /a>,c int  a href="__useblocknr" c  ue=L558"> 45 goto  a href="+8NVALENOEN8" class="sINVALf">ret /a8;>ree /a> * a hre8 href="+c8de=n" class="sref">b    8}>ret a> == - a href="+8"6 cla4"f8class="oues="oaf">ret /a8;>rcIOCTL_GET_BDESCSode=ret" class=lf">rcIOCTL_GET_BDESCS> 41  ue=L558"> 45 goto  a href="+8e7 cla4"f8line" n6mue=L626"> 456 /8>>inodeeeeeeeeee=">argv /a>,c int  a href="__useblocknr" cns="sref">ret a> == - a href="+8"8 cla4"f8ve_dper_segs="cf">rN /a>8;>rcIOCTL_CLEAN_SEGMENTSode=ret" class=lf">rcIOCTL_CLEAN_SEGMENTS> 41  ue=L558"> 45 goto  a href="+8e9 cla4"f8class="oues="oaf">ret /a8;> cla4s,  a href="+co[    +code=clean_segruct  a href="+code=inode" clas=">argv /a>,c istruct  a href="+code=ficpt c=">argv /a>,c i       sref">inodeeeeeeeeee=">argv /a>,c int  a href="__useblocknr" cns="sref">ret a> == - a href="+89" class=8line" n6mue=L629"> 399 /8>>rcIOCTL_SYNCode=ret" class=lf">rcIOCTL_SYNC> 41  ue=L558"> 45 goto  a href="+8srefnmemb8" class="srsref"> 3N /a>8;>   +code=clean_segruct  a href="+code=inode" clas=">argv /a>,c istruct  a href="+code=ficpt c=">argv /a>,c i       sref">inodeeeeeeeeee=">argv /a>,c int  a href="__useblocknr" cns="sref">ret a> == - a href="+897e f">or8class="oues="oaf">ret /a8;>rcIOCTL_RESIZE  a href="+codelf">rcIOCTL_RESIZE> 41  ue=L558"> 45 goto  a href="+8sf="+code8line" n6mue=L632"> 442 /8>>ret a> == - a href="+8v_nmembs"8class="sref">v_nmemet /a8;>rcIOCTL_SET_ALLOC_RANGE  a href="+codelf">rcIOCTL_SET_ALLOC_RANGE> 41  ue=L558"> 45 goto  a href="+8shref="+c8" class="+cbae=4"> et /a8;>ret a> == - a href="+8code=n" c8ass="le+nmembs /a>>a>++)8{> 45 goto  a href="+8s7 cla4"f8NT" class="+ULL4"> et /a8;>ret a> == - a href="+8c8 cla4"f8           continueat /a8;> 428 /a>               8}> 399 /8>>or8=n" class="sref">>>a>++)8{>ino,       struct  a href="+code=ficpt cLLli4e" n5mue=L575"> 375 /a>       sref">inodeeeeeeeeeembs ( /a>,c i2/io45l.c#L368"5" cref="+code=argp" cr" ccodlock,asrefofcc int  a href=7nosrde8_O7" clas8="+NOMEM4"> et /a7;>ret /a7;>inodeeeeeeee) _ fs /a>-> dat href="+flag_897ode=a447> 374 8a>               7}>rcIL_SET_32GSode=ret" class=FS_IOC_GETFLA32GSode=rete=L558"> 45 goto  a href="+8shref="e=7" clas8="le+nmem&>>a>++)7{>inodeeeeeeee) _ fs 3"> 453 /aastruct GETFLAGSode=ret" class=FS_IOC_GETFLAGS> 41  ue=L5">ret a> == - a href="+8c8 cla4EN7" clas8="sFAUL=f">ret /a7;>ret a> == - a href="+8c8 cla4Ef8       ass="sref">&et /a7;>rcIGETFLA32GSode=ret" class=FS_IOC_SETFLA32GSode=rete=L558"> 45 goto  a href="+8shref="e88> 428 /oues="oaf">ret /a7;>inodeeeeeeee) _ fs 3"> 453 /aastruct GETFLAGSode=ret" class=FS_IOC_SETFLAGS> 41  ue=L5">ret a> == - a href="+8c8 cla4497> 429 8a>               7}>ret a> == - a href="+8c8 cla4n67ue=L658"> 430 /a>       7}>rcIL_SET_32GSodpabode=ficpt  aFS_IOC_GETVER32GSodpabode=e=L558"> 45 goto  a href="+8shref="s=7line" 86mue=L651"> 431 /7>>inodeeeeeeee) _ fs 3"> 453 /aastruct GETFLAGSodpabode=ficpt  aFS_IOC_GETVERSIOa> 41  ue=L5">ret a> == - a href="+8c8 cla4nO7" clas8"commeist */ /spa7n>ret a> == - a href="+8c8 cla4n"7class=8_gc(),ist */ /spa7n>rcIOCTL_SET_ALLCPMODE  a href="+codelf">rcIOCTL_CHANGE_CPMODE> 41  ue=L558"> 45 goto  a href="+8n7 cla4447oueirt8alingeously. /spa7n>rcIOCTL_DELETE_CHECKPOIN   a href="+codelf">rcIOCTL_DELETE_CHECKPOIN > 41  ue=L558"> 45 goto  a href="+8n9 cla4r=7c oper8Colls,ist */ /spa7n>rcIOCTL_GET_BDESCSoO a href="+codlf">rcIOCTL_GET_CPINF/> 41  ue=L558"> 45 goto  a href="+8=7his ito7ic ope8aColleously. /spa7n>rcIOCTL_GET_CPSTA   a href="+codelf">rcIOCTL_GET_CPSTA > 41  ue=L558"> 45 goto  a href="+8=5 cla4="7omment8>   *list */ /spa7n>rcIOCTL_CLEAN_SNF/IO a href="+codlf">rcIOCTL_GET_SUINF/> 41  ue=L558"> 45 goto  a href="+8=7 cla4387ss="sr8flag_nmem&>>a>++)7{>rcIOCTL_GET_SUSTA   a href="+codelf">rcIOCTL_GET_SUSTA > 41  ue=L558"> 45 goto  a href="+8ode=cnoOE7T" cla8s="sBUSYf">ret /a7;>rcIOCTL_GET_SUSTA   a href="+codlf">rcIOCTL_GET_VINF/> 41  ue=L558"> 45 goto  a href="+8ef="+con67class=8oues="oaf">ret /a7;>rcIOCTL_GET_BDESCSode=ret" class=lf">rcIOCTL_GET_BDESCS> 41  ue=L558"> 45 goto  a href="+8e7 cla4n67ue=L668"> 430 /a>       7}>rcIOCTL_RESIZE EGMENTSode=ret" class=lf">rcIOCTL_CLEAN_SEGMENTS> 41  ue=L558"> 45 goto  a href="+8e9 cla4pa7line" 86mue=L662"> 442 /7>>rcIOCTL_RESIZE =ret" class=lf">rcIOCTL_SYNC> 41  ue=L558"> 45 goto  a href="+8srefnme" 7lass=u8budelock[0>&et /a7;>rcIOCTL_SET_ALL a href="+codelf">rcIOCTL_RESIZE> 41  ue=L558"> 45 goto  a href="+8sf="+co c7ass="s8ef"?"> 458 /at /a7;>rcIOCTL_DELETE_OC_RANGE  a href="+codelf">rcIOCTL_SET_ALLOC_RANGE> 41  ue=L558"> 45 goto  a href="+8shref="pa7aColl:8&;data" t /a7;>ret a> == - a href="+8c8 cla4e=7et" cl8ss="sref">rNh /a>7;> 45 goto  a href="+8s7 cla4so7_667">8447 /a>       /a>7;>ret a> == - a href="+8c8 cla4387" clas8=ukbudelockNh /a>7;> 399 /7>>argv /a>,c i       sref">inodeeeeeeeeee=">argv(a>,c i2/io45l.c#L368"5" cref="5ide=Lpt5"> 435 /a>     toide=Lpt5ode=clean_segruct  a"+code=argp" cr" ccodlock,f">ret a> == - a href="+8code=n"n67 ( a h8ef="coe3a2b58s1467.cret /a7;6 4     7}6 footer">
The original LXR software by th          lhttp://sourceforge.net/projects/lxr">LXR toimunity">argvthis experi   +al uef="+c by         lmailto:lxr@4  ux.no">lxr@4  ux.no">ar.
subfooter"> lxr.4 ux.no kindly host2/iby lhttp://www.redpill-4 pro.no">Redpill L pro AS">argvprovider of L ux tons=L5ing and operat"+cs services since 1995.