diff options
author | OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> | 2013-12-03 20:15:58 +0900 |
---|---|---|
committer | Daniel Phillips <daniel@tux3.org> | 2013-12-03 20:15:58 +0900 |
commit | 785f4517c75ef75d5c2c4339461c4152c5b0e634 (patch) | |
tree | 89387232809336a117c91c016126ad8eaf2b37f2 | |
parent | 4f4d78e2da786be67e2254406f3485ef914210d0 (diff) | |
download | linux-tux3-785f4517c75ef75d5c2c4339461c4152c5b0e634.tar.gz |
tux3: Fix comment in seg_alloc()
-ENOSPC in backend is the bug of block reservation of frontend.
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
-rw-r--r-- | fs/tux3/filemap.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/fs/tux3/filemap.c b/fs/tux3/filemap.c index 0c7930f2d3ba32..dd52127a3d6985 100644 --- a/fs/tux3/filemap.c +++ b/fs/tux3/filemap.c @@ -371,24 +371,8 @@ static int seg_alloc(struct btree *btree, struct dleaf_req *rq, continue; err = balloc_partial(sb, seg[i].count, &tmp, 1); - if (err) { // goal ??? - /* - * Out of space on file data allocation. It - * happens. Tread carefully. We have not - * stored anything in the btree yet, so we - * free what we allocated so far. We need to - * leave the user with a nice ENOSPC return - * and all metadata consistent on disk. We - * better have reserved everything we need for - * metadata, just giving up is not an option. - */ - /* - * Alternatively, we can go ahead and try to - * record just what we successfully allocated, - * then if the update fails on no space for - * btree splits, free just the blocks for - * extents we failed to store. - */ + if (err) { + assert(err != -ENOSPC); /* frontend reservation bug */ return err; } |