segment.c (9ccf56c13831c5fe0edecd8c1184c9a6fe805d23) | segment.c (7a65004bbaa6a21a0438aac9c64814e46084dc3f) |
---|---|
1/* 2 * segment.c - NILFS segment constructor. 3 * 4 * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation. 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 187 unchanged lines hidden (view full) --- 196 * the segment semaphore, to make a segment construction and write tasks 197 * exclusive. The function is used with nilfs_transaction_commit() in pairs. 198 * The region enclosed by these two functions can be nested. To avoid a 199 * deadlock, the semaphore is only acquired or released in the outermost call. 200 * 201 * This function allocates a nilfs_transaction_info struct to keep context 202 * information on it. It is initialized and hooked onto the current task in 203 * the outermost call. If a pre-allocated struct is given to @ti, it is used | 1/* 2 * segment.c - NILFS segment constructor. 3 * 4 * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation. 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or --- 187 unchanged lines hidden (view full) --- 196 * the segment semaphore, to make a segment construction and write tasks 197 * exclusive. The function is used with nilfs_transaction_commit() in pairs. 198 * The region enclosed by these two functions can be nested. To avoid a 199 * deadlock, the semaphore is only acquired or released in the outermost call. 200 * 201 * This function allocates a nilfs_transaction_info struct to keep context 202 * information on it. It is initialized and hooked onto the current task in 203 * the outermost call. If a pre-allocated struct is given to @ti, it is used |
204 * instead; othewise a new struct is assigned from a slab. | 204 * instead; otherwise a new struct is assigned from a slab. |
205 * 206 * When @vacancy_check flag is set, this function will check the amount of 207 * free space, and will wait for the GC to reclaim disk space if low capacity. 208 * 209 * Return Value: On success, 0 is returned. On error, one of the following 210 * negative error code is returned. 211 * 212 * %-ENOMEM - Insufficient memory available. --- 2636 unchanged lines hidden (view full) --- 2849 kfree(sci); 2850} 2851 2852/** 2853 * nilfs_attach_segment_constructor - attach a segment constructor 2854 * @sbi: nilfs_sb_info 2855 * 2856 * nilfs_attach_segment_constructor() allocates a struct nilfs_sc_info, | 205 * 206 * When @vacancy_check flag is set, this function will check the amount of 207 * free space, and will wait for the GC to reclaim disk space if low capacity. 208 * 209 * Return Value: On success, 0 is returned. On error, one of the following 210 * negative error code is returned. 211 * 212 * %-ENOMEM - Insufficient memory available. --- 2636 unchanged lines hidden (view full) --- 2849 kfree(sci); 2850} 2851 2852/** 2853 * nilfs_attach_segment_constructor - attach a segment constructor 2854 * @sbi: nilfs_sb_info 2855 * 2856 * nilfs_attach_segment_constructor() allocates a struct nilfs_sc_info, |
2857 * initilizes it, and starts the segment constructor. | 2857 * initializes it, and starts the segment constructor. |
2858 * 2859 * Return Value: On success, 0 is returned. On error, one of the following 2860 * negative error code is returned. 2861 * 2862 * %-ENOMEM - Insufficient memory available. 2863 */ 2864int nilfs_attach_segment_constructor(struct nilfs_sb_info *sbi) 2865{ --- 58 unchanged lines hidden --- | 2858 * 2859 * Return Value: On success, 0 is returned. On error, one of the following 2860 * negative error code is returned. 2861 * 2862 * %-ENOMEM - Insufficient memory available. 2863 */ 2864int nilfs_attach_segment_constructor(struct nilfs_sb_info *sbi) 2865{ --- 58 unchanged lines hidden --- |